From de6d6a768ab01eee2a16aa88897ffe236b0070f7 Mon Sep 17 00:00:00 2001 From: Takayuki Maeda Date: Sat, 9 Oct 2021 13:38:02 +0900 Subject: [PATCH] fix tab --- src/components/tab.rs | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/components/tab.rs b/src/components/tab.rs index edc20e9..f6aae60 100644 --- a/src/components/tab.rs +++ b/src/components/tab.rs @@ -16,12 +16,8 @@ use tui::{ #[derive(Debug, Clone, Copy, EnumIter)] pub enum Tab { Records, - Columns, - Constraints, - ForeignKeys, - Indexes, - Sql, Properties, + Sql, } impl std::fmt::Display for Tab { @@ -50,12 +46,8 @@ impl TabComponent { fn names(&self) -> Vec { vec![ command::tab_records(&self.key_config).name, - command::tab_columns(&self.key_config).name, - command::tab_constraints(&self.key_config).name, - command::tab_foreign_keys(&self.key_config).name, - command::tab_indexes(&self.key_config).name, - command::tab_sql_editor(&self.key_config).name, command::tab_properties(&self.key_config).name, + command::tab_sql_editor(&self.key_config).name, ] } } @@ -84,18 +76,6 @@ impl Component for TabComponent { if key == self.key_config.tab_records { self.selected_tab = Tab::Records; return Ok(EventState::Consumed); - } else if key == self.key_config.tab_columns { - self.selected_tab = Tab::Columns; - return Ok(EventState::Consumed); - } else if key == self.key_config.tab_constraints { - self.selected_tab = Tab::Constraints; - return Ok(EventState::Consumed); - } else if key == self.key_config.tab_foreign_keys { - self.selected_tab = Tab::ForeignKeys; - return Ok(EventState::Consumed); - } else if key == self.key_config.tab_indexes { - self.selected_tab = Tab::Indexes; - return Ok(EventState::Consumed); } else if key == self.key_config.tab_sql_editor { self.selected_tab = Tab::Sql; return Ok(EventState::Consumed);