mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-03 01:50:12 +00:00
feat(ui): make the top UI help bar toggleable (#41)
This commit is contained in:
parent
75d0bf7b6b
commit
40d5b20c7d
@ -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"
|
||||
|
@ -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),
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user