Skip to content

Commit

Permalink
🐛 debug windows close
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Dec 21, 2024
1 parent e58c8ec commit 66616ff
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions dist/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as psl from 'psl';
import isUrl from 'is-url';

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 engines = {
node: ">=16.0.0"
Expand Down Expand Up @@ -70,7 +70,7 @@ var dependencies = {
"@tauri-apps/api": "^1.6.0",
"@tauri-apps/cli": "^2.1.0",
axios: "^1.7.9",
chalk: "^5.3.0",
chalk: "^5.4.0",
commander: "^11.1.0",
"file-type": "^18.7.0",
"fs-extra": "^11.2.0",
Expand Down Expand Up @@ -100,7 +100,7 @@ var devDependencies = {
"@types/update-notifier": "^6.0.8",
"app-root-path": "^3.1.0",
"cross-env": "^7.0.3",
rollup: "^4.28.1",
rollup: "^4.29.1",
"rollup-plugin-typescript2": "^0.36.0",
tslib: "^2.8.1",
typescript: "^5.7.2"
Expand Down Expand Up @@ -381,7 +381,7 @@ async function isChinaIP(ip, domain) {
try {
const delay = await ping(ip);
logger.debug(`${domain} latency is ${delay} ms`);
return delay > 500;
return delay > 1000;
}
catch (error) {
logger.debug(`ping ${domain} failed!`);
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pake-cli",
"version": "3.0.1",
"version": "3.0.2",
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 利用 Rust 轻松构建轻量级多端桌面应用。",
"engines": {
"node": ">=16.0.0"
Expand Down Expand Up @@ -50,7 +50,7 @@
"@tauri-apps/api": "^1.6.0",
"@tauri-apps/cli": "^2.1.0",
"axios": "^1.7.9",
"chalk": "^5.3.0",
"chalk": "^5.4.0",
"commander": "^11.1.0",
"file-type": "^18.7.0",
"fs-extra": "^11.2.0",
Expand Down Expand Up @@ -80,7 +80,7 @@
"@types/update-notifier": "^6.0.8",
"app-root-path": "^3.1.0",
"cross-env": "^7.0.3",
"rollup": "^4.28.1",
"rollup": "^4.29.1",
"rollup-plugin-typescript2": "^0.36.0",
"tslib": "^2.8.1",
"typescript": "^5.7.2"
Expand Down
8 changes: 4 additions & 4 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ tauri-build = { version = "2.0.3", features = [] }

[dependencies]
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-plugin-window-state = "2.2.0"
tauri-plugin-oauth = "2"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/app/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn set_system_tray(app: &AppHandle) -> tauri::Result<()> {
}
"quit" => {
let _res = app.save_window_state(StateFlags::all());
std::process::exit(0);
app.get_webview_window("pake").unwrap().close().unwrap();
}
_ => (),
})
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub fn run_app() {
}

#[cfg(not(target_os = "macos"))]
window.destroy().unwrap();
std::process::exit(0);
}
})
.run(tauri::generate_context!())
Expand Down

0 comments on commit 66616ff

Please sign in to comment.