diff --git a/theseus/src/api/settings.rs b/theseus/src/api/settings.rs index 6e1a5c01d..1a6385ea0 100644 --- a/theseus/src/api/settings.rs +++ b/theseus/src/api/settings.rs @@ -18,7 +18,6 @@ pub async fn get() -> crate::Result { #[tracing::instrument] pub async fn set(settings: Settings) -> crate::Result<()> { let state = State::get().await?; - // Replaces the settings struct in the RwLock with the passed argument let (reset_io, reset_fetch) = async { let read = state.settings.read().await; ( @@ -28,13 +27,17 @@ pub async fn set(settings: Settings) -> crate::Result<()> { } .await; - *state.settings.write().await = settings; + { + *state.settings.write().await = settings; + } + if reset_io { state.reset_io_semaphore().await; } if reset_fetch { state.reset_fetch_semaphore().await; } + State::sync().await?; Ok(()) } diff --git a/theseus/src/launcher/mod.rs b/theseus/src/launcher/mod.rs index c052f09a2..3d966a979 100644 --- a/theseus/src/launcher/mod.rs +++ b/theseus/src/launcher/mod.rs @@ -149,7 +149,7 @@ pub async fn install_minecraft( let java_version = get_java_version_from_profile(profile, &version_info) .await? .ok_or_else(|| { - crate::ErrorKind::LauncherError( + crate::ErrorKind::OtherError( "No available java installation".to_string(), ) })?; diff --git a/theseus/src/state/settings.rs b/theseus/src/state/settings.rs index a93205c77..7732e21c8 100644 --- a/theseus/src/state/settings.rs +++ b/theseus/src/state/settings.rs @@ -39,8 +39,8 @@ impl Default for Settings { java_globals: JavaGlobals::new(), default_user: None, hooks: Hooks::default(), - max_concurrent_downloads: 64, - max_concurrent_writes: 100, + max_concurrent_downloads: 10, + max_concurrent_writes: 10, version: CURRENT_FORMAT_VERSION, collapsed_navigation: false, } diff --git a/theseus/src/util/jre.rs b/theseus/src/util/jre.rs index 09dd6a7f1..eb992f3b1 100644 --- a/theseus/src/util/jre.rs +++ b/theseus/src/util/jre.rs @@ -221,7 +221,7 @@ async fn get_all_jre_path() -> Result, JREError> { #[cfg(target_os = "windows")] #[allow(dead_code)] -const JAVA_BIN: &str = "java.exe"; +const JAVA_BIN: &str = "javaw.exe"; #[cfg(not(target_os = "windows"))] #[allow(dead_code)] diff --git a/theseus_gui/.prettierignore b/theseus_gui/.prettierignore index 76ac1f1b4..d162033a9 100644 --- a/theseus_gui/.prettierignore +++ b/theseus_gui/.prettierignore @@ -8,6 +8,7 @@ node_modules dist *.md package.json +dist/ generated/ !.gitkeep @@ -86,4 +87,4 @@ sw.* # pnpm files pnpm-lock.yaml -/.npmrc \ No newline at end of file +/.npmrc diff --git a/theseus_gui/package.json b/theseus_gui/package.json index 7a70c6d97..e1d24a48c 100644 --- a/theseus_gui/package.json +++ b/theseus_gui/package.json @@ -14,12 +14,12 @@ }, "dependencies": { "@tauri-apps/api": "^1.2.0", + "dayjs": "^1.11.7", "ofetch": "^1.0.1", "omorphia": "^0.4.17", "pinia": "^2.0.33", "vite-svg-loader": "^4.0.0", "vue": "^3.2.45", - "dayjs": "^1.11.7", "vue-multiselect": "^3.0.0-alpha.2", "vue-router": "4" }, diff --git a/theseus_gui/src-tauri/Cargo.toml b/theseus_gui/src-tauri/Cargo.toml index 1d572e2c6..ae702c5a4 100644 --- a/theseus_gui/src-tauri/Cargo.toml +++ b/theseus_gui/src-tauri/Cargo.toml @@ -19,7 +19,7 @@ theseus = { path = "../../theseus", features = ["tauri"] } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.2", features = ["dialog", "dialog-open", "protocol-asset", "shell-open", "updater", "window-close", "window-create"] } +tauri = { version = "1.2", features = ["devtools", "dialog", "dialog-open", "protocol-asset", "shell-open", "updater", "window-close", "window-create"] } tokio = { version = "1", features = ["full"] } thiserror = "1.0" tokio-stream = { version = "0.1", features = ["fs"] } diff --git a/theseus_gui/src/components/ui/AccountsCard.vue b/theseus_gui/src/components/ui/AccountsCard.vue index 6b5e742a9..418a29203 100644 --- a/theseus_gui/src/components/ui/AccountsCard.vue +++ b/theseus_gui/src/components/ui/AccountsCard.vue @@ -47,7 +47,7 @@ @@ -115,6 +115,7 @@ const login = async () => { const url = await authenticate_begin_flow().catch(handleError) const window = new WebviewWindow('loginWindow', { + title: 'Modrinth App', url: url, }) diff --git a/theseus_gui/src/components/ui/Instance.vue b/theseus_gui/src/components/ui/Instance.vue index 23e218214..1438b1122 100644 --- a/theseus_gui/src/components/ui/Instance.vue +++ b/theseus_gui/src/components/ui/Instance.vue @@ -1,7 +1,7 @@ diff --git a/theseus_gui/src/pages/instance/Options.vue b/theseus_gui/src/pages/instance/Options.vue index 81480c0d7..ef6d894d3 100644 --- a/theseus_gui/src/pages/instance/Options.vue +++ b/theseus_gui/src/pages/instance/Options.vue @@ -56,7 +56,7 @@
diff --git a/theseus_gui/src/store/theme.js b/theseus_gui/src/store/theme.js index 6b7c11b96..181f54dfb 100644 --- a/theseus_gui/src/store/theme.js +++ b/theseus_gui/src/store/theme.js @@ -2,7 +2,7 @@ import { defineStore } from 'pinia' export const useTheming = defineStore('themeStore', { state: () => ({ - themeOptions: ['light', 'dark'], + themeOptions: ['dark'], collapsedNavigation: false, selectedTheme: 'dark', darkTheme: true,