Auto-fix formatting issues
This commit is contained in:
5
bin/builders/LinuxBuilder.ts
vendored
5
bin/builders/LinuxBuilder.ts
vendored
@@ -81,7 +81,10 @@ export default class LinuxBuilder extends BaseBuilder {
|
|||||||
// Enable verbose output for AppImage builds when debugging or PAKE_VERBOSE is set.
|
// Enable verbose output for AppImage builds when debugging or PAKE_VERBOSE is set.
|
||||||
// AppImage builds often fail with minimal error messages from linuxdeploy,
|
// AppImage builds often fail with minimal error messages from linuxdeploy,
|
||||||
// so verbose mode helps diagnose issues like strip failures and missing dependencies.
|
// 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';
|
fullCommand += ' --verbose';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,11 @@ use tauri::{
|
|||||||
use tauri_plugin_global_shortcut::{GlobalShortcutExt, Shortcut};
|
use tauri_plugin_global_shortcut::{GlobalShortcutExt, Shortcut};
|
||||||
use tauri_plugin_window_state::{AppHandleExt, StateFlags};
|
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 {
|
if !show_system_tray {
|
||||||
app.remove_tray_by_id("pake-tray");
|
app.remove_tray_by_id("pake-tray");
|
||||||
return Ok(());
|
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() {
|
.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 {
|
} else {
|
||||||
tauri::image::Image::from_path(tray_icon_path).unwrap_or_else(|_| {
|
tauri::image::Image::from_path(tray_icon_path).unwrap_or_else(|_| {
|
||||||
// If custom tray icon fails to load, fallback to default
|
// 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)?;
|
.build(app)?;
|
||||||
|
|||||||
@@ -63,7 +63,12 @@ pub fn run_app() {
|
|||||||
])
|
])
|
||||||
.setup(move |app| {
|
.setup(move |app| {
|
||||||
let window = set_window(app, &pake_config, &tauri_config);
|
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();
|
set_global_shortcut(app.app_handle(), activation_shortcut).unwrap();
|
||||||
|
|
||||||
// Show window after state restoration to prevent position flashing
|
// Show window after state restoration to prevent position flashing
|
||||||
|
|||||||
Reference in New Issue
Block a user