feat(ui): make the top UI help bar toggleable (#41)

This commit is contained in:
Alexandre Pasmantier 2024-11-19 00:07:53 +01:00 committed by GitHub
parent 75d0bf7b6b
commit 40d5b20c7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 3 deletions

View File

@ -56,6 +56,8 @@ copy_entry_to_clipboard = "ctrl-y"
toggle_remote_control = "ctrl-r"
# Toggle the send to channel mode
toggle_send_to_channel = "ctrl-s"
# Toggle the help bar
toggle_help = "ctrl-g"
# Remote control mode
@ -70,6 +72,8 @@ select_prev_entry = "up"
select_entry = "enter"
# Toggle the remote control mode
toggle_remote_control = "ctrl-r"
# Toggle the help bar
toggle_help = "ctrl-g"
# Send to channel mode
@ -84,3 +88,5 @@ select_prev_entry = "up"
select_entry = "enter"
# Toggle the send to channel mode
toggle_send_to_channel = "ctrl-s"
# Toggle the help bar
toggle_help = "ctrl-g"

View File

@ -87,9 +87,9 @@ pub enum Action {
/// Quit the application.
#[serde(alias = "quit")]
Quit,
/// Toggle the help screen.
#[serde(skip)]
Help,
/// Toggle the help bar.
#[serde(alias = "toggle_help")]
ToggleHelp,
/// Signal an error with the given message.
#[serde(skip)]
Error(String),

View File

@ -360,6 +360,9 @@ impl Television {
self.mode = Mode::Channel;
}
},
Action::ToggleHelp => {
self.config.ui.show_help_bar = !self.config.ui.show_help_bar;
}
_ => {}
}
Ok(None)