feat: update tauri version
This commit is contained in:
parent
eb86b471fe
commit
6193a842f4
34
package.json
34
package.json
@ -17,35 +17,35 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.7.0",
|
"@emotion/react": "^11.7.0",
|
||||||
"@emotion/styled": "^11.6.0",
|
"@emotion/styled": "^11.6.0",
|
||||||
"@mui/icons-material": "^5.2.1",
|
"@mui/icons-material": "^5.4.1",
|
||||||
"@mui/material": "^5.2.3",
|
"@mui/material": "^5.4.1",
|
||||||
"@tauri-apps/api": "^1.0.0-beta.8",
|
"@tauri-apps/api": "^1.0.0-rc.0",
|
||||||
"ahooks": "^3.1.7",
|
"ahooks": "^3.1.9",
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.25.0",
|
||||||
"dayjs": "^1.10.7",
|
"dayjs": "^1.10.7",
|
||||||
"react": "^17.0.0",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.0",
|
"react-dom": "^17.0.2",
|
||||||
"react-router-dom": "^6.0.2",
|
"react-router-dom": "^6.2.1",
|
||||||
"react-virtuoso": "^2.3.1",
|
"react-virtuoso": "^2.7.0",
|
||||||
"recoil": "^0.5.2",
|
"recoil": "^0.6.1",
|
||||||
"swr": "^1.1.2-beta.0"
|
"swr": "^1.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/github": "^5.0.0",
|
"@actions/github": "^5.0.0",
|
||||||
"@tauri-apps/cli": "^1.0.0-beta.10",
|
"@tauri-apps/cli": "^1.0.0-rc.2",
|
||||||
"@types/fs-extra": "^9.0.13",
|
"@types/fs-extra": "^9.0.13",
|
||||||
"@types/js-cookie": "^3.0.1",
|
"@types/js-cookie": "^3.0.1",
|
||||||
"@types/react": "^17.0.0",
|
"@types/react": "^17.0.0",
|
||||||
"@types/react-dom": "^17.0.0",
|
"@types/react-dom": "^17.0.0",
|
||||||
"@vitejs/plugin-react": "^1.1.1",
|
"@vitejs/plugin-react": "^1.2.0",
|
||||||
"adm-zip": "^0.5.9",
|
"adm-zip": "^0.5.9",
|
||||||
"fs-extra": "^10.0.0",
|
"fs-extra": "^10.0.0",
|
||||||
"husky": "^7.0.0",
|
"husky": "^7.0.0",
|
||||||
"node-fetch": "^3.1.0",
|
"node-fetch": "^3.2.0",
|
||||||
"pretty-quick": "^3.1.3",
|
"pretty-quick": "^3.1.3",
|
||||||
"sass": "^1.44.0",
|
"sass": "^1.49.7",
|
||||||
"typescript": "^4.5.2",
|
"typescript": "^4.5.5",
|
||||||
"vite": "^2.7.1"
|
"vite": "^2.8.0"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
|
1082
src-tauri/Cargo.lock
generated
1082
src-tauri/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@ edition = "2021"
|
|||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { version = "1.0.0-beta.4" }
|
tauri-build = { version = "1.0.0-rc.1", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
dirs = "4.0.0"
|
dirs = "4.0.0"
|
||||||
@ -18,9 +18,7 @@ chrono = "0.4.19"
|
|||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde_yaml = "0.8"
|
serde_yaml = "0.8"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
# tauri = { version = "1.0.0-beta.8", features = ["api-all", "system-tray"] }
|
tauri = { version = "1.0.0-rc.1", features = ["api-all", "system-tray", "updater"] }
|
||||||
# tauri = { git = "https://github.com/tauri-apps/tauri", rev = "5e0d59ec", features = ["api-all", "system-tray"] }
|
|
||||||
tauri = { git = "https://github.com/tauri-apps/tauri", branch = "next", features = ["api-all", "system-tray", "updater"] }
|
|
||||||
tauri-plugin-shadows = { git = "https://github.com/tauri-apps/tauri-plugin-shadows", features = ["tauri-impl"] }
|
tauri-plugin-shadows = { git = "https://github.com/tauri-apps/tauri-plugin-shadows", features = ["tauri-impl"] }
|
||||||
tauri-plugin-vibrancy = { git = "https://github.com/tauri-apps/tauri-plugin-vibrancy", features = ["tauri-impl"] }
|
tauri-plugin-vibrancy = { git = "https://github.com/tauri-apps/tauri-plugin-vibrancy", features = ["tauri-impl"] }
|
||||||
|
|
||||||
|
@ -105,7 +105,9 @@ impl Verge {
|
|||||||
pub fn init_launch(&mut self, package_info: &tauri::PackageInfo) {
|
pub fn init_launch(&mut self, package_info: &tauri::PackageInfo) {
|
||||||
let app_name = "clash-verge";
|
let app_name = "clash-verge";
|
||||||
let app_path = get_app_path(app_name);
|
let app_path = get_app_path(app_name);
|
||||||
let app_path = resource_dir(package_info).unwrap().join(app_path);
|
let app_path = resource_dir(package_info, &tauri::Env::default())
|
||||||
|
.unwrap()
|
||||||
|
.join(app_path);
|
||||||
let app_path = app_path.as_os_str().to_str().unwrap();
|
let app_path = app_path.as_os_str().to_str().unwrap();
|
||||||
|
|
||||||
let auto = AutoLaunchBuilder::new()
|
let auto = AutoLaunchBuilder::new()
|
||||||
|
@ -53,9 +53,9 @@ fn main() -> std::io::Result<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
"quit" => {
|
"quit" => {
|
||||||
api::process::kill_children();
|
|
||||||
resolve::resolve_reset(app_handle);
|
resolve::resolve_reset(app_handle);
|
||||||
app_handle.exit(0);
|
api::process::kill_children();
|
||||||
|
std::process::exit(0);
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
},
|
},
|
||||||
@ -94,12 +94,12 @@ fn main() -> std::io::Result<()> {
|
|||||||
.build(tauri::generate_context!())
|
.build(tauri::generate_context!())
|
||||||
.expect("error while running tauri application")
|
.expect("error while running tauri application")
|
||||||
.run(|app_handle, e| match e {
|
.run(|app_handle, e| match e {
|
||||||
tauri::Event::CloseRequested { label, api, .. } => {
|
tauri::RunEvent::CloseRequested { label, api, .. } => {
|
||||||
let app_handle = app_handle.clone();
|
let app_handle = app_handle.clone();
|
||||||
api.prevent_close();
|
api.prevent_close();
|
||||||
app_handle.get_window(&label).unwrap().hide().unwrap();
|
app_handle.get_window(&label).unwrap().hide().unwrap();
|
||||||
}
|
}
|
||||||
tauri::Event::ExitRequested { .. } => {
|
tauri::RunEvent::ExitRequested { .. } => {
|
||||||
resolve::resolve_reset(app_handle);
|
resolve::resolve_reset(app_handle);
|
||||||
api::process::kill_children();
|
api::process::kill_children();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use tauri::{
|
use tauri::{
|
||||||
api::path::{home_dir, resource_dir},
|
api::path::{home_dir, resource_dir},
|
||||||
PackageInfo,
|
Env, PackageInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// get the verge app home dir
|
/// get the verge app home dir
|
||||||
@ -14,5 +14,7 @@ pub fn app_home_dir() -> PathBuf {
|
|||||||
|
|
||||||
/// get the resources dir
|
/// get the resources dir
|
||||||
pub fn app_resources_dir(package_info: &PackageInfo) -> PathBuf {
|
pub fn app_resources_dir(package_info: &PackageInfo) -> PathBuf {
|
||||||
resource_dir(package_info).unwrap().join("resources")
|
resource_dir(package_info, &Env::default())
|
||||||
|
.unwrap()
|
||||||
|
.join("resources")
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,8 @@
|
|||||||
"endpoints": [
|
"endpoints": [
|
||||||
"https://github.com/zzzgydi/clash-verge/releases/download/updater/update.json"
|
"https://github.com/zzzgydi/clash-verge/releases/download/updater/update.json"
|
||||||
],
|
],
|
||||||
"dialog": false
|
"dialog": false,
|
||||||
|
"pubkey": ""
|
||||||
},
|
},
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
"all": true
|
"all": true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user