From c79d5c32a6cd47f44df9469e73c5025c02af1e1d Mon Sep 17 00:00:00 2001 From: "Adrian O.V" <83074853+CodexAdrian@users.noreply.github.com> Date: Fri, 5 May 2023 18:37:23 -0400 Subject: [PATCH] Bring back the old nav (#100) * Bring back the old nav * Added bool to settings * settings wireup * Fixy fix * fix create btn --------- Co-authored-by: thesuzerain Co-authored-by: Jai A --- theseus/src/state/projects.rs | 1 - theseus/src/state/settings.rs | 2 + theseus_gui/src-tauri/src/api/settings.rs | 3 + theseus_gui/src/App.vue | 160 +++++++++++------- theseus_gui/src/assets/icons/index.js | 1 + theseus_gui/src/assets/icons/users.svg | 1 + .../src/assets/stylesheets/global.scss | 6 + .../src/components/ui/AccountsCard.vue | 88 +++++++--- theseus_gui/src/helpers/settings.js | 1 + theseus_gui/src/pages/Settings.vue | 19 +++ theseus_gui/src/store/theme.js | 7 +- 11 files changed, 202 insertions(+), 87 deletions(-) create mode 100644 theseus_gui/src/assets/icons/users.svg diff --git a/theseus/src/state/projects.rs b/theseus/src/state/projects.rs index 3925bbec..dd9ff403 100644 --- a/theseus/src/state/projects.rs +++ b/theseus/src/state/projects.rs @@ -361,7 +361,6 @@ pub async fn infer_data_from_files( update_version: update_versions .get(&hash) .map(|val| Box::new(val.clone())), - incompatible: !version.loaders.contains( &profile .metadata diff --git a/theseus/src/state/settings.rs b/theseus/src/state/settings.rs index ddc32f99..8548d585 100644 --- a/theseus/src/state/settings.rs +++ b/theseus/src/state/settings.rs @@ -24,6 +24,7 @@ pub struct Settings { pub hooks: Hooks, pub max_concurrent_downloads: usize, pub version: u32, + pub collapsed_navigation: bool, } impl Default for Settings { @@ -39,6 +40,7 @@ impl Default for Settings { hooks: Hooks::default(), max_concurrent_downloads: 64, version: CURRENT_FORMAT_VERSION, + collapsed_navigation: false, } } } diff --git a/theseus_gui/src-tauri/src/api/settings.rs b/theseus_gui/src-tauri/src/api/settings.rs index 9251b3d4..b3e14cbe 100644 --- a/theseus_gui/src-tauri/src/api/settings.rs +++ b/theseus_gui/src-tauri/src/api/settings.rs @@ -16,6 +16,7 @@ pub struct FrontendSettings { pub hooks: Hooks, pub max_concurrent_downloads: usize, pub version: u32, + pub collapsed_navigation: bool, } // Get full settings @@ -39,6 +40,7 @@ pub async fn settings_get() -> Result { hooks: backend_settings.hooks, max_concurrent_downloads: backend_settings.max_concurrent_downloads, version: backend_settings.version, + collapsed_navigation: backend_settings.collapsed_navigation, }; Ok(frontend_settings) } @@ -76,6 +78,7 @@ pub async fn settings_set(settings: FrontendSettings) -> Result<()> { hooks: settings.hooks, max_concurrent_downloads: settings.max_concurrent_downloads, version: settings.version, + collapsed_navigation: settings.collapsed_navigation, }; settings::set(backend_settings).await?; Ok(()) diff --git a/theseus_gui/src/App.vue b/theseus_gui/src/App.vue index be412432..5b1c848a 100644 --- a/theseus_gui/src/App.vue +++ b/theseus_gui/src/App.vue @@ -1,7 +1,7 @@