Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

Auto-fix formatting issues

GitHub Actiond4bbea917edd
diff --git a/bin/builders/LinuxBuilder.ts b/bin/builders/LinuxBuilder.ts
index 2b12cbe8..3efb64ae 100644
--- a/bin/builders/LinuxBuilder.ts
+++ b/bin/builders/LinuxBuilder.ts
@@ -81,7 +81,10 @@ export default class LinuxBuilder extends BaseBuilder {
// Enable verbose output for AppImage builds when debugging or PAKE_VERBOSE is set.
// AppImage builds often fail with minimal error messages from linuxdeploy,
// so verbose mode helps diagnose issues like strip failures and missing dependencies.
- if (this.options.targets === 'appimage' && (this.options.debug || process.env.PAKE_VERBOSE)) {
+ if (
+ this.options.targets === 'appimage' &&
+ (this.options.debug || process.env.PAKE_VERBOSE)
+ ) {
fullCommand += ' --verbose';
}
diff --git a/src-tauri/src/app/setup.rs b/src-tauri/src/app/setup.rs
index 7a01a76b..642e81f3 100644
--- a/src-tauri/src/app/setup.rs
+++ b/src-tauri/src/app/setup.rs
@@ -9,7 +9,11 @@ use tauri::{
use tauri_plugin_global_shortcut::{GlobalShortcutExt, Shortcut};
use tauri_plugin_window_state::{AppHandleExt, StateFlags};
-pub fn set_system_tray(app: &AppHandle, show_system_tray: bool, tray_icon_path: &str) -> tauri::Result<()> {
+pub fn set_system_tray(
+ app: &AppHandle,
+ show_system_tray: bool,
+ tray_icon_path: &str,
+) -> tauri::Result<()> {
if !show_system_tray {
app.remove_tray_by_id("pake-tray");
return Ok(());
@@ -61,11 +65,15 @@ pub fn set_system_tray(app: &AppHandle, show_system_tray: bool, tray_icon_path:
_ => {}
})
.icon(if tray_icon_path.is_empty() {
- app.default_window_icon().unwrap_or_else(|| panic!("Failed to get default window icon")).clone()
+ app.default_window_icon()
+ .unwrap_or_else(|| panic!("Failed to get default window icon"))
+ .clone()
} else {
tauri::image::Image::from_path(tray_icon_path).unwrap_or_else(|_| {
// If custom tray icon fails to load, fallback to default
- app.default_window_icon().unwrap_or_else(|| panic!("Failed to get default window icon")).clone()
+ app.default_window_icon()
+ .unwrap_or_else(|| panic!("Failed to get default window icon"))
+ .clone()
})
})
.build(app)?;
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 6e7b6fc8..9895142b 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -63,7 +63,12 @@ pub fn run_app() {
])
.setup(move |app| {
let window = set_window(app, &pake_config, &tauri_config);
- set_system_tray(app.app_handle(), show_system_tray, &pake_config.system_tray_path).unwrap();
+ set_system_tray(
+ app.app_handle(),
+ show_system_tray,
+ &pake_config.system_tray_path,
+ )
+ .unwrap();
set_global_shortcut(app.app_handle(), activation_shortcut).unwrap();
// Show window after state restoration to prevent position flashing