pake-cli 3.2.17 → 3.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -7
- package/dist/cli.js +21 -11
- package/package.json +6 -5
- package/src-tauri/.pake/pake.json +9 -6
- package/src-tauri/.pake/tauri.conf.json +5 -5
- package/src-tauri/.pake/tauri.macos.conf.json +3 -3
- package/src-tauri/Cargo.lock +267 -362
- package/src-tauri/Cargo.toml +6 -6
- package/src-tauri/pake.json +3 -1
- package/src-tauri/src/app/config.rs +1 -0
- package/src-tauri/src/app/window.rs +8 -2
- package/src-tauri/src/lib.rs +11 -2
package/src-tauri/Cargo.toml
CHANGED
|
@@ -18,17 +18,17 @@ crate-type = ["staticlib", "cdylib", "lib"]
|
|
|
18
18
|
tauri-build = { version = "2.4.0", features = [] }
|
|
19
19
|
|
|
20
20
|
[dependencies]
|
|
21
|
-
serde_json = "1.0.
|
|
21
|
+
serde_json = "1.0.143"
|
|
22
22
|
serde = { version = "1.0.219", features = ["derive"] }
|
|
23
23
|
tokio = { version = "1.47.1", features = ["full"] }
|
|
24
|
-
tauri = { version = "2.8.
|
|
24
|
+
tauri = { version = "2.8.4", features = ["tray-icon", "image-ico", "image-png", "macos-proxy"] }
|
|
25
25
|
tauri-plugin-window-state = "2.4.0"
|
|
26
26
|
tauri-plugin-oauth = "2.0.0"
|
|
27
|
-
tauri-plugin-http = "2.5.
|
|
27
|
+
tauri-plugin-http = "2.5.2"
|
|
28
28
|
tauri-plugin-global-shortcut = { version = "2.3.0" }
|
|
29
|
-
tauri-plugin-shell = "2.3.
|
|
30
|
-
tauri-plugin-single-instance = "2.3.
|
|
31
|
-
tauri-plugin-notification = "2.3.
|
|
29
|
+
tauri-plugin-shell = "2.3.1"
|
|
30
|
+
tauri-plugin-single-instance = "2.3.3"
|
|
31
|
+
tauri-plugin-notification = "2.3.1"
|
|
32
32
|
|
|
33
33
|
[features]
|
|
34
34
|
# this feature is used for development builds from development cli
|
package/src-tauri/pake.json
CHANGED
|
@@ -38,8 +38,14 @@ pub fn set_window(app: &mut App, config: &PakeConfig, tauri_config: &Config) ->
|
|
|
38
38
|
.fullscreen(window_config.fullscreen)
|
|
39
39
|
.inner_size(window_config.width, window_config.height)
|
|
40
40
|
.always_on_top(window_config.always_on_top)
|
|
41
|
-
.
|
|
42
|
-
|
|
41
|
+
.incognito(window_config.incognito);
|
|
42
|
+
|
|
43
|
+
// Conditionally disable drag-drop handler
|
|
44
|
+
if !window_config.enable_drag_drop {
|
|
45
|
+
window_builder = window_builder.disable_drag_drop_handler();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
window_builder = window_builder
|
|
43
49
|
.initialization_script(&config_script)
|
|
44
50
|
.initialization_script(include_str!("../inject/component.js"))
|
|
45
51
|
.initialization_script(include_str!("../inject/event.js"))
|
package/src-tauri/src/lib.rs
CHANGED
|
@@ -41,7 +41,13 @@ pub fn run_app() {
|
|
|
41
41
|
.plugin(tauri_plugin_http::init())
|
|
42
42
|
.plugin(tauri_plugin_shell::init())
|
|
43
43
|
.plugin(tauri_plugin_notification::init())
|
|
44
|
-
.plugin(tauri_plugin_single_instance::init(|
|
|
44
|
+
.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
|
45
|
+
if let Some(window) = app.get_webview_window("pake") {
|
|
46
|
+
let _ = window.unminimize();
|
|
47
|
+
let _ = window.show();
|
|
48
|
+
let _ = window.set_focus();
|
|
49
|
+
}
|
|
50
|
+
}))
|
|
45
51
|
.invoke_handler(tauri::generate_handler![
|
|
46
52
|
download_file,
|
|
47
53
|
download_file_by_binary,
|
|
@@ -64,6 +70,7 @@ pub fn run_app() {
|
|
|
64
70
|
.on_window_event(move |_window, _event| {
|
|
65
71
|
if let tauri::WindowEvent::CloseRequested { api, .. } = _event {
|
|
66
72
|
if hide_on_close {
|
|
73
|
+
// Hide window when hide_on_close is enabled (regardless of tray status)
|
|
67
74
|
let window = _window.clone();
|
|
68
75
|
tauri::async_runtime::spawn(async move {
|
|
69
76
|
#[cfg(target_os = "macos")]
|
|
@@ -77,8 +84,10 @@ pub fn run_app() {
|
|
|
77
84
|
window.hide().unwrap();
|
|
78
85
|
});
|
|
79
86
|
api.prevent_close();
|
|
87
|
+
} else {
|
|
88
|
+
// Exit app completely when hide_on_close is false
|
|
89
|
+
std::process::exit(0);
|
|
80
90
|
}
|
|
81
|
-
// If hide_on_close is false, allow normal close behavior
|
|
82
91
|
}
|
|
83
92
|
})
|
|
84
93
|
.run(tauri::generate_context!())
|