Skip to content

Commit e26f456

Browse files
committed
Update help_popup.rs
Code format changes.
1 parent 7c0470c commit e26f456

1 file changed

Lines changed: 76 additions & 19 deletions

File tree

crates/loom-tui/src/components/help_popup.rs

Lines changed: 76 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,27 +160,72 @@ fn build_sections(keymap: &Keymap) -> Vec<HelpSection> {
160160
HelpSection {
161161
title: "GLOBAL SHORTCUTS (configurable)".to_string(),
162162
entries: vec![
163-
(keymap.hint("switch_to_browser").to_string(), "Browser layout".to_string()),
164-
(keymap.hint("switch_to_profiles").to_string(), "Profiles layout".to_string()),
165-
(keymap.hint("show_connect_dialog").to_string(), "Connect dialog".to_string()),
166-
(keymap.hint("show_export_dialog").to_string(), "Export dialog".to_string()),
167-
(format!("{}/?", keymap.hint("show_help")), "Help".to_string()),
168-
(keymap.hint("show_schema_viewer").to_string(), "Schema viewer".to_string()),
169-
(keymap.hint("toggle_log_panel").to_string(), "Log panel".to_string()),
170-
(keymap.hint("show_bulk_update").to_string(), "Bulk update".to_string()),
171-
(keymap.hint("search").to_string(), "Focus search input".to_string()),
172-
(keymap.hint("save_connection").to_string(), "Save connection".to_string()),
173-
(keymap.hint("focus_next").to_string(), "Next panel".to_string()),
174-
(keymap.hint("focus_prev").to_string(), "Previous panel".to_string()),
163+
(
164+
keymap.hint("switch_to_browser").to_string(),
165+
"Browser layout".to_string(),
166+
),
167+
(
168+
keymap.hint("switch_to_profiles").to_string(),
169+
"Profiles layout".to_string(),
170+
),
171+
(
172+
keymap.hint("show_connect_dialog").to_string(),
173+
"Connect dialog".to_string(),
174+
),
175+
(
176+
keymap.hint("show_export_dialog").to_string(),
177+
"Export dialog".to_string(),
178+
),
179+
(
180+
format!("{}/?", keymap.hint("show_help")),
181+
"Help".to_string(),
182+
),
183+
(
184+
keymap.hint("show_schema_viewer").to_string(),
185+
"Schema viewer".to_string(),
186+
),
187+
(
188+
keymap.hint("toggle_log_panel").to_string(),
189+
"Log panel".to_string(),
190+
),
191+
(
192+
keymap.hint("show_bulk_update").to_string(),
193+
"Bulk update".to_string(),
194+
),
195+
(
196+
keymap.hint("search").to_string(),
197+
"Focus search input".to_string(),
198+
),
199+
(
200+
keymap.hint("save_connection").to_string(),
201+
"Save connection".to_string(),
202+
),
203+
(
204+
keymap.hint("focus_next").to_string(),
205+
"Next panel".to_string(),
206+
),
207+
(
208+
keymap.hint("focus_prev").to_string(),
209+
"Previous panel".to_string(),
210+
),
175211
(keymap.hint("quit").to_string(), "Quit".to_string()),
176-
(keymap.hint("force_quit").to_string(), "Force quit".to_string()),
212+
(
213+
keymap.hint("force_quit").to_string(),
214+
"Force quit".to_string(),
215+
),
177216
],
178217
},
179218
HelpSection {
180219
title: "TREE PANEL".to_string(),
181220
entries: vec![
182-
("j/k \u{2191}/\u{2193}".to_string(), "Navigate up/down".to_string()),
183-
("l/\u{2192}/Enter".to_string(), "Expand / toggle node".to_string()),
221+
(
222+
"j/k \u{2191}/\u{2193}".to_string(),
223+
"Navigate up/down".to_string(),
224+
),
225+
(
226+
"l/\u{2192}/Enter".to_string(),
227+
"Expand / toggle node".to_string(),
228+
),
184229
("h/\u{2190}".to_string(), "Collapse node".to_string()),
185230
("a".to_string(), "Create child entry".to_string()),
186231
("d/Delete".to_string(), "Delete entry".to_string()),
@@ -189,7 +234,10 @@ fn build_sections(keymap: &Keymap) -> Vec<HelpSection> {
189234
HelpSection {
190235
title: "DETAIL PANEL".to_string(),
191236
entries: vec![
192-
("j/k \u{2191}/\u{2193}".to_string(), "Navigate attributes".to_string()),
237+
(
238+
"j/k \u{2191}/\u{2193}".to_string(),
239+
"Navigate attributes".to_string(),
240+
),
193241
("e/Enter".to_string(), "Edit attribute value".to_string()),
194242
("a".to_string(), "Add new attribute".to_string()),
195243
("+".to_string(), "Add value to attribute".to_string()),
@@ -210,7 +258,10 @@ fn build_sections(keymap: &Keymap) -> Vec<HelpSection> {
210258
HelpSection {
211259
title: "PROFILES TREE".to_string(),
212260
entries: vec![
213-
("j/k \u{2191}/\u{2193}".to_string(), "Navigate profiles".to_string()),
261+
(
262+
"j/k \u{2191}/\u{2193}".to_string(),
263+
"Navigate profiles".to_string(),
264+
),
214265
("l/\u{2192}".to_string(), "Expand folder / view".to_string()),
215266
("h/\u{2190}".to_string(), "Collapse folder".to_string()),
216267
("e".to_string(), "Edit / view profile".to_string()),
@@ -234,7 +285,10 @@ fn build_sections(keymap: &Keymap) -> Vec<HelpSection> {
234285
HelpSection {
235286
title: "SEARCH RESULTS".to_string(),
236287
entries: vec![
237-
("j/k \u{2191}/\u{2193}".to_string(), "Navigate results".to_string()),
288+
(
289+
"j/k \u{2191}/\u{2193}".to_string(),
290+
"Navigate results".to_string(),
291+
),
238292
("Enter".to_string(), "Go to selected entry".to_string()),
239293
("Esc/q".to_string(), "Close".to_string()),
240294
],
@@ -262,7 +316,10 @@ fn build_sections(keymap: &Keymap) -> Vec<HelpSection> {
262316
entries: vec![
263317
("y".to_string(), "Confirm (Yes)".to_string()),
264318
("n/Esc".to_string(), "Cancel (No)".to_string()),
265-
("h/l \u{2190}/\u{2192}".to_string(), "Select Yes / No".to_string()),
319+
(
320+
"h/l \u{2190}/\u{2192}".to_string(),
321+
"Select Yes / No".to_string(),
322+
),
266323
("Enter".to_string(), "Execute selection".to_string()),
267324
],
268325
},

0 commit comments

Comments
 (0)