From 147772162416b17969551cb7cf057039c6a2f0a8 Mon Sep 17 00:00:00 2001 From: MissterHao Date: Wed, 23 Nov 2022 08:01:45 +0800 Subject: [PATCH] Remove settings tab for the first version --- src/application/app.rs | 3 ++- src/presentation/ui.rs | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/application/app.rs b/src/application/app.rs index 36d9da3..4046420 100644 --- a/src/application/app.rs +++ b/src/application/app.rs @@ -61,7 +61,8 @@ impl<'a> App<'a> { pub fn new(title: &'a str, show_splash_screen: bool) -> App<'a> { App { title, - tabs: TabsState::new(vec!["Workspaces", "Settings"]), + tabs: TabsState::new(vec!["Workspaces"]), + // tabs: TabsState::new(vec!["Workspaces", "Settings"]), status: ApplicationStatus::PrepareEnvironment, control_mode: ApplicationControlMode::default(), show_splash_screen, diff --git a/src/presentation/ui.rs b/src/presentation/ui.rs index fb6b9ff..8a4b30d 100644 --- a/src/presentation/ui.rs +++ b/src/presentation/ui.rs @@ -68,9 +68,11 @@ where f.render_widget(tabs, chunks[0]); // Render tab content to terminal + // Settings tab is in todo list, allow single match for current version + #[allow(clippy::single_match)] match app.tabs.index { 0 => draw_management_tab(f, app, chunks[1]), - 1 => draw_settings_tab(f, app, chunks[1]), + // 1 => draw_settings_tab(f, app, chunks[1]), _ => {} }; } @@ -120,6 +122,7 @@ where /// * `f` - Franme /// * `app` - App struct /// * `area` - area of frame +#[allow(dead_code)] fn draw_settings_tab(_f: &mut Frame, _app: &mut App, area: Rect) where B: Backend,