diff --git a/Cargo.lock b/Cargo.lock index 9782bb4..4d43cbf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6973,6 +6973,7 @@ dependencies = [ "path-util", "quartz_nbt", "regex", + "semver", "serde", "serde_json", "serde_with", diff --git a/Cargo.toml b/Cargo.toml index 1338da0..6a7a81b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,6 +84,7 @@ rgb = "0.8.52" rustls = { version = "0.23.42", default-features = false, features = ["ring", "std", "tls12"] } rustls-native-certs = "0.8.4" rustls-pki-types = "1.15.0" +semver = "1.0.28" serde = "1.0.228" serde_bytes = "0.11.19" serde_cbor = "0.11.2" diff --git a/apps/app/Cargo.toml b/apps/app/Cargo.toml index 2b66379..8a45c99 100644 --- a/apps/app/Cargo.toml +++ b/apps/app/Cargo.toml @@ -29,6 +29,7 @@ paste = { workspace = true } path-util = { workspace = true } quartz_nbt = { workspace = true, features = ["serde"] } regex = { workspace = true } +semver = { workspace = true } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } serde_with = { workspace = true } diff --git a/apps/app/src/api/files.rs b/apps/app/src/api/files.rs index 68ac99a..e1fac14 100644 --- a/apps/app/src/api/files.rs +++ b/apps/app/src/api/files.rs @@ -9,7 +9,7 @@ use std::path::PathBuf; use std::sync::Mutex; use tauri::{Emitter, Runtime}; use tauri_plugin_dialog::DialogExt; -use theseus::instance::{get_full_path, list}; +use theseus::instance::get_full_path; const STUDIO_FILES_CHANGED_EVENT: &str = "studio-files-changed"; diff --git a/apps/app/src/updater_impl.rs b/apps/app/src/updater_impl.rs index 1074564..3817ee6 100644 --- a/apps/app/src/updater_impl.rs +++ b/apps/app/src/updater_impl.rs @@ -1,5 +1,6 @@ use crate::api::Result; use futures::StreamExt; +use semver::Version; use serde::{Deserialize, Serialize}; use sha2::{Digest, Sha256}; use std::sync::{Arc, Mutex}; @@ -8,7 +9,7 @@ use tauri::http::header::ACCEPT; use tauri::{Manager, ResourceId, Runtime, Webview}; use tauri_plugin_http::reqwest; use tauri_plugin_http::reqwest::ClientBuilder; -use tauri_plugin_updater::{Error, Update, UpdaterExt, Version}; +use tauri_plugin_updater::{Error, Update, UpdaterExt}; use theseus::{ LoadingBarType, emit_loading, init_loading, launcher_user_agent, }; diff --git a/packages/app-lib/src/state/mod.rs b/packages/app-lib/src/state/mod.rs index 18c5c70..3875ae1 100644 --- a/packages/app-lib/src/state/mod.rs +++ b/packages/app-lib/src/state/mod.rs @@ -623,7 +623,7 @@ impl State { } /// 在设置变更(如忽略 SSL 证书开关)后重建 HTTP 客户端。 - pub(crate) async fn update_http_client_for_settings( + pub async fn update_http_client_for_settings( &self, settings: &Settings, ) -> crate::Result<()> {