Add a per Tab config

A tab config is useful for allowing users to show hidden files, sorting
by different metrics such as size or MIME type, as well as providing a
way to implement some of the todos such as configurable icon sizes for
views.
This commit is contained in:
Josh Megnauth 2024-02-10 02:13:13 -05:00 committed by Jeremy Soller
parent 75874caf9d
commit 073a9a95ab
4 changed files with 41 additions and 14 deletions

View file

@ -25,6 +25,7 @@ use std::{
};
use crate::{
config::Tab as TabConfig,
fl, home_dir,
tab::{self, Location, Tab},
};
@ -78,7 +79,7 @@ pub struct App {
impl App {
fn open_tab(&mut self, location: Location) -> Command<Message> {
let mut tab = Tab::new(location.clone());
let mut tab = Tab::new(location.clone(), TabConfig::default());
tab.dialog = true;
let entity = self
.tab_model