From bad6f14af620548c890ef16609a3a685941b7aca Mon Sep 17 00:00:00 2001 From: kyoto7250 <50972773+kyoto7250@users.noreply.github.com> Date: Fri, 24 Jun 2022 17:47:31 +0900 Subject: [PATCH] adding help and README for exit pop up key (#144) --- README.md | 1 + src/app.rs | 1 + src/components/command.rs | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 39b6ec9..2e30f4f 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ If you want to add connections, you need to edit your config file. For more info | / | Filter | | ? | Help | | 1, 2, 3, 4, 5 | Switch to records/columns/constraints/foreign keys/indexes tab | +| Esc | Hide pop up | ## Configuration diff --git a/src/app.rs b/src/app.rs index abfc7b1..db41011 100644 --- a/src/app.rs +++ b/src/app.rs @@ -113,6 +113,7 @@ impl App { fn commands(&self) -> Vec { let mut res = vec![ + CommandInfo::new(command::exit_pop_up(&self.config.key_config)), CommandInfo::new(command::filter(&self.config.key_config)), CommandInfo::new(command::help(&self.config.key_config)), CommandInfo::new(command::toggle_tabs(&self.config.key_config)), diff --git a/src/components/command.rs b/src/components/command.rs index 961b8c6..e569309 100644 --- a/src/components/command.rs +++ b/src/components/command.rs @@ -172,3 +172,10 @@ pub fn help(key_config: &KeyConfig) -> CommandText { CMD_GROUP_GENERAL, ) } + +pub fn exit_pop_up(key_config: &KeyConfig) -> CommandText { + CommandText::new( + format!("Exit pop up [{}]", key_config.exit_popup), + CMD_GROUP_GENERAL, + ) +}