Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 32 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ image = "=0.25.8"

# Main functionalities
## Syntax highlighting
syntect = { version = "=5.2.0", features = ["default-fancy"] }
syntect = { version = "=5.2.0", default-features = false, features = ["default-fancy"] }
## Serialize & Deserialize application data into files
serde = { version = "=1.0.219", features = ["derive", "rc"] }
serde_json = "=1.0.143"
Expand All @@ -75,6 +75,8 @@ clap = { version = "=4.5", features = ["derive", "color", "suggestions"] }
directories = "=6.0.0"
## Copy response body to clipboard
arboard = { version = "=3.6.0", features = ["wayland-data-control"] }
## Used to spawn an external file editor
edit = "0.1.5"

# Async
## Handle asynchronous requests
Expand Down Expand Up @@ -128,4 +130,4 @@ tracing-subscriber = { version = "=0.3.20", features = ["parking_lot", "chrono",
## Log crate compatibility for tracing
tracing-log = "=0.2.0"
## Opentracing middleware implementation for reqwest-middleware
reqwest-tracing = "=0.5.8"
reqwest-tracing = "=0.5.8"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No line return needed

4 changes: 3 additions & 1 deletion example_resources/key_bindings/default_key_bindings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ select = "Enter"
create_element = "n"
delete_element = "d"
edit_element = "Enter" # Edit query param, header, basic auth, bearer token
alt_edit_element = "Shift-R" # Edit query param, header, basic auth, bearer token via system editor
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Same as above but via system editor

rename_element = "r" # Only used in the collections list (main menu)
toggle_element = "t" # Only used in tables (Query params, headers, cookies)
duplicate_element = "Ctrl-d"
Expand All @@ -85,6 +86,7 @@ duplicate_element = "Ctrl-d"
param_next_tab = "Tab"

change_url = "u"
alt_change_url = "Shift-U"
change_method = "m"
request_settings = "s"

Expand All @@ -108,4 +110,4 @@ scroll_right = "Ctrl-Right"

yank_response_part = "y" # Used to yank the current result tab (e.g. body, headers, cookies)

result_next_tab = "Shift-BackTab" # Will use param_next_tab depending on the selected view
result_next_tab = "Shift-BackTab" # Will use param_next_tab depending on the selected view
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No line return needed

4 changes: 3 additions & 1 deletion example_resources/key_bindings/mac_key_bindings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ select = "Enter"
create_element = "n"
delete_element = "d"
edit_element = "Enter" # Edit query param, header, basic auth, bearer token
alt_edit_element = "Shift-R" # Edit query param, header, basic auth, bearer token via system editor
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Same as above but via system editor

rename_element = "r" # Only used in the collections list (main menu)
toggle_element = "t" # Only used in tables (Query params, headers, cookies)
duplicate_element = "Ctrl-d"
Expand All @@ -85,6 +86,7 @@ duplicate_element = "Ctrl-d"
param_next_tab = "Tab"

change_url = "u"
alt_change_url = "Shift-U"
change_method = "m"
request_settings = "s"

Expand All @@ -108,4 +110,4 @@ scroll_right = "Shift-Right"

yank_response_part = "y" # Used to yank the current result tab (e.g. body, headers, cookies)

result_next_tab = "Shift-BackTab" # Will use param_next_tab depending on the selected view
result_next_tab = "Shift-BackTab" # Will use param_next_tab depending on the selected view
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No line return needed

4 changes: 3 additions & 1 deletion example_resources/key_bindings/vim_key_bindings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ select = "Enter"
create_element = "Shift-N"
delete_element = "Shift-D"
edit_element = "Enter" # Edit query param, header, basic auth, bearer token
alt_edit_element = "Shift-E" # Edit query param, header, basic auth, bearer token via system editor
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Same as above but via system editor

rename_element = "Shift-R" # Only used in the collections list (main menu)
toggle_element = "Shift-T" # Only used in tables (Query params, headers, cookies)
duplicate_element = "Shift-Y"
Expand All @@ -66,6 +67,7 @@ duplicate_element = "Shift-Y"
param_next_tab = "t"

change_url = "Shift-U"
alt_change_url = "Ctrl-U"
change_method = "Shift-M"
request_settings = "Shift-S"

Expand All @@ -89,4 +91,4 @@ scroll_right = "Ctrl-l"

yank_response_part = "Shift-Y" # Used to yank the current result tab (e.g. body, headers, cookies)

result_next_tab = "Ctrl-t" # Will use param_next_tab depending on the selected view
result_next_tab = "Ctrl-t" # Will use param_next_tab depending on the selected view
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No line return needed

2 changes: 1 addition & 1 deletion src/app/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl App<'_> {
while !self.should_quit {
self.update_current_available_events();
self.draw(&mut terminal)?;
self.handle_events().await;
self.handle_events(&mut terminal).await;
}

Ok(())
Expand Down
4 changes: 4 additions & 0 deletions src/app/files/key_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ nest! {
pub create_element: KeyCombination,
pub delete_element: KeyCombination,
pub edit_element: KeyCombination,
pub alt_edit_element: KeyCombination,
/// Only used in the collections list (main menu)
pub rename_element: KeyCombination,
/// Only used in tables (Query params, headers, cookies)
Expand All @@ -98,6 +99,7 @@ nest! {
pub request_selected: #[derive(Copy, Clone, Deserialize)] pub struct RequestSelected {
pub param_next_tab: KeyCombination,
pub change_url: KeyCombination,
pub alt_change_url: KeyCombination,
pub change_method: KeyCombination,
pub request_settings: KeyCombination,
pub export_request: KeyCombination,
Expand Down Expand Up @@ -217,6 +219,7 @@ impl Default for KeyBindings {
create_element: key!(n),
delete_element: key!(d),
edit_element: key!(enter),
alt_edit_element: key!(Shift-r),
rename_element: key!(r),
toggle_element: key!(t),
duplicate_element: key!(ctrl-d),
Expand All @@ -227,6 +230,7 @@ impl Default for KeyBindings {
param_next_tab: key!(tab),

change_url: key!(u),
alt_change_url: key!(ctrl-u),
change_method: key!(m),

request_settings: key!(s),
Expand Down
2 changes: 1 addition & 1 deletion src/models/protocol/http/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ pub fn find_file_format_in_content_type(headers: &Vec<(String, String)>) -> Opti
else {
return None;
}
}
}
5 changes: 4 additions & 1 deletion src/tui/app_states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ impl AppState {
Documentation(EventKeyBinding::new(vec![key_bindings.generic.display_help], "Display help", Some("Help"))),

EditUrl(EventKeyBinding::new(vec![key_bindings.request_selected.change_url], "Edit URL", Some("URL"))),
EditUrlSystemEditor(EventKeyBinding::new(vec![key_bindings.request_selected.alt_change_url], "Edit URL via system editor", Some("URL"))),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Same via system editor"

EditMethod(EventKeyBinding::new(vec![key_bindings.request_selected.change_method], "Change method", Some("Method"))),

EditSettings(EventKeyBinding::new(vec![key_bindings.request_selected.request_settings], "Request settings", None)),
Expand Down Expand Up @@ -447,6 +448,7 @@ impl AppState {
],
RequestParamsTabs::Body => vec![
EditRequestBody(EventKeyBinding::new(vec![key_bindings.generic.list_and_table_actions.edit_element], "Edit body", None)),
EditRequestBodySystemEditor(EventKeyBinding::new(vec![key_bindings.generic.list_and_table_actions.alt_edit_element], "Edit body via system editor", None)),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Same via system editor"


RequestBodyTableMoveUp(EventKeyBinding::new(vec![key_bindings.generic.navigation.move_cursor_up], "Move up", None)),
RequestBodyTableMoveDown(EventKeyBinding::new(vec![key_bindings.generic.navigation.move_cursor_down], "Move down", None)),
Expand All @@ -463,6 +465,7 @@ impl AppState {
],
RequestParamsTabs::Scripts => vec![
EditRequestScript(EventKeyBinding::new(vec![key_bindings.generic.list_and_table_actions.edit_element], "Edit request script", Some("Edit"))),
EditRequestScriptSystemEditor(EventKeyBinding::new(vec![key_bindings.generic.list_and_table_actions.alt_edit_element], "Edit request script via system editor", None)),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Same via system editor"

RequestScriptMove(EventKeyBinding::new(vec![key_bindings.generic.navigation.move_cursor_up], "Move up", Some("Up"))),
RequestScriptMove(EventKeyBinding::new(vec![key_bindings.generic.navigation.move_cursor_down], "Move down", Some("Down"))),
]
Expand Down Expand Up @@ -876,4 +879,4 @@ impl App<'_> {
_ => false
}
}
}
}
Loading