mirror of
https://github.com/kristoferssolo/traxor.git
synced 2025-10-21 20:10:35 +00:00
remove Settings tab
This commit is contained in:
parent
f8f1fc3bb6
commit
695a0c3b27
@ -22,7 +22,7 @@ impl<'a> App<'a> {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
running: true,
|
||||
tabs: &[Tab::All, Tab::Active, Tab::Downloading, Tab::Settings],
|
||||
tabs: &[Tab::All, Tab::Active, Tab::Downloading],
|
||||
index: 0,
|
||||
state: TableState::default(),
|
||||
torrents: Torrents::new(),
|
||||
|
||||
@ -8,7 +8,6 @@ pub enum Tab {
|
||||
All,
|
||||
Active,
|
||||
Downloading,
|
||||
Settings,
|
||||
}
|
||||
|
||||
impl Tab {
|
||||
@ -45,7 +44,6 @@ impl Tab {
|
||||
TorrentGetField::DownloadDir,
|
||||
TorrentGetField::Name,
|
||||
],
|
||||
Tab::Settings => &[],
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -56,7 +54,6 @@ impl ToString for Tab {
|
||||
Tab::All => String::from("All"),
|
||||
Tab::Active => String::from("Active"),
|
||||
Tab::Downloading => String::from("Downloading"),
|
||||
Tab::Settings => String::from("Settings"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,7 +93,6 @@ pub fn render<'a, B: Backend>(app: &mut App, frame: &mut Frame<'_, B>) {
|
||||
0 => render_table(app, Tab::All),
|
||||
1 => render_table(app, Tab::Active),
|
||||
2 => render_table(app, Tab::Downloading),
|
||||
3 => render_table(app, Tab::Settings),
|
||||
_ => unreachable!(),
|
||||
};
|
||||
frame.render_stateful_widget(inner.widths(widths.as_ref()), chunks[1], &mut app.state)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user