Skip to content

Commit

Permalink
Remove settings tab for the first version
Browse files Browse the repository at this point in the history
  • Loading branch information
MissterHao committed Nov 23, 2022
1 parent 492eb9d commit 1477721
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/application/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion src/presentation/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]),
_ => {}
};
}
Expand Down Expand Up @@ -120,6 +122,7 @@ where
/// * `f` - Franme
/// * `app` - App struct
/// * `area` - area of frame
#[allow(dead_code)]
fn draw_settings_tab<B>(_f: &mut Frame<B>, _app: &mut App, area: Rect)
where
B: Backend,
Expand Down

0 comments on commit 1477721

Please sign in to comment.