🐛 debug windows close

This commit is contained in:
Tw93
2024-12-21 22:25:26 +08:00
parent e58c8ec0f1
commit 66616ff23c
6 changed files with 14 additions and 14 deletions

8
dist/cli.js vendored
View File

@@ -20,7 +20,7 @@ import * as psl from 'psl';
import isUrl from 'is-url'; import isUrl from 'is-url';
var name = "pake-cli"; var name = "pake-cli";
var version$1 = "3.0.1"; var version$1 = "3.0.2";
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。"; var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。";
var engines = { var engines = {
node: ">=16.0.0" node: ">=16.0.0"
@@ -70,7 +70,7 @@ var dependencies = {
"@tauri-apps/api": "^1.6.0", "@tauri-apps/api": "^1.6.0",
"@tauri-apps/cli": "^2.1.0", "@tauri-apps/cli": "^2.1.0",
axios: "^1.7.9", axios: "^1.7.9",
chalk: "^5.3.0", chalk: "^5.4.0",
commander: "^11.1.0", commander: "^11.1.0",
"file-type": "^18.7.0", "file-type": "^18.7.0",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
@@ -100,7 +100,7 @@ var devDependencies = {
"@types/update-notifier": "^6.0.8", "@types/update-notifier": "^6.0.8",
"app-root-path": "^3.1.0", "app-root-path": "^3.1.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
rollup: "^4.28.1", rollup: "^4.29.1",
"rollup-plugin-typescript2": "^0.36.0", "rollup-plugin-typescript2": "^0.36.0",
tslib: "^2.8.1", tslib: "^2.8.1",
typescript: "^5.7.2" typescript: "^5.7.2"
@@ -381,7 +381,7 @@ async function isChinaIP(ip, domain) {
try { try {
const delay = await ping(ip); const delay = await ping(ip);
logger.debug(`${domain} latency is ${delay} ms`); logger.debug(`${domain} latency is ${delay} ms`);
return delay > 500; return delay > 1000;
} }
catch (error) { catch (error) {
logger.debug(`ping ${domain} failed!`); logger.debug(`ping ${domain} failed!`);

View File

@@ -1,6 +1,6 @@
{ {
"name": "pake-cli", "name": "pake-cli",
"version": "3.0.1", "version": "3.0.2",
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。", "description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。",
"engines": { "engines": {
"node": ">=16.0.0" "node": ">=16.0.0"
@@ -50,7 +50,7 @@
"@tauri-apps/api": "^1.6.0", "@tauri-apps/api": "^1.6.0",
"@tauri-apps/cli": "^2.1.0", "@tauri-apps/cli": "^2.1.0",
"axios": "^1.7.9", "axios": "^1.7.9",
"chalk": "^5.3.0", "chalk": "^5.4.0",
"commander": "^11.1.0", "commander": "^11.1.0",
"file-type": "^18.7.0", "file-type": "^18.7.0",
"fs-extra": "^11.2.0", "fs-extra": "^11.2.0",
@@ -80,7 +80,7 @@
"@types/update-notifier": "^6.0.8", "@types/update-notifier": "^6.0.8",
"app-root-path": "^3.1.0", "app-root-path": "^3.1.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"rollup": "^4.28.1", "rollup": "^4.29.1",
"rollup-plugin-typescript2": "^0.36.0", "rollup-plugin-typescript2": "^0.36.0",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.7.2" "typescript": "^5.7.2"

8
src-tauri/Cargo.lock generated
View File

@@ -3393,9 +3393,9 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.215" version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
@@ -3413,9 +3413,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.215" version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",

View File

@@ -19,7 +19,7 @@ tauri-build = { version = "2.0.3", features = [] }
[dependencies] [dependencies]
serde_json = "1.0.133" serde_json = "1.0.133"
serde = { version = "1.0.215", features = ["derive"] } serde = { version = "1.0.216", features = ["derive"] }
tauri = { version = "2.1.1", features = ["tray-icon", "image-ico", "image-png", "macos-proxy"] } tauri = { version = "2.1.1", features = ["tray-icon", "image-ico", "image-png", "macos-proxy"] }
tauri-plugin-window-state = "2.2.0" tauri-plugin-window-state = "2.2.0"
tauri-plugin-oauth = "2" tauri-plugin-oauth = "2"

View File

@@ -24,7 +24,7 @@ pub fn set_system_tray(app: &AppHandle) -> tauri::Result<()> {
} }
"quit" => { "quit" => {
let _res = app.save_window_state(StateFlags::all()); let _res = app.save_window_state(StateFlags::all());
std::process::exit(0); app.get_webview_window("pake").unwrap().close().unwrap();
} }
_ => (), _ => (),
}) })

View File

@@ -120,7 +120,7 @@ pub fn run_app() {
} }
#[cfg(not(target_os = "macos"))] #[cfg(not(target_os = "macos"))]
window.destroy().unwrap(); std::process::exit(0);
} }
}) })
.run(tauri::generate_context!()) .run(tauri::generate_context!())