fix(macos): silence notification when hiding window with Cmd+W

This commit is contained in:
Tunglies
2026-09-21 20:37:24 +08:00
parent 8982525fd2
commit af0f502f98
15 changed files with 0 additions and 48 deletions
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: على وشك الخروج title: على وشك الخروج
body: Clash Verge على وشك الخروج. body: Clash Verge على وشك الخروج.
appHidden:
title: تم إخفاء التطبيق
body: Clash Verge يعمل في الخلفية.
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: Beenden steht bevor title: Beenden steht bevor
body: Clash Verge wird gleich beendet. body: Clash Verge wird gleich beendet.
appHidden:
title: Anwendung ausgeblendet
body: Clash Verge läuft im Hintergrund.
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: About to Exit title: About to Exit
body: Clash Verge is about to exit. body: Clash Verge is about to exit.
appHidden:
title: Application Hidden
body: Clash Verge is running in the background.
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: A punto de salir title: A punto de salir
body: Clash Verge está a punto de salir. body: Clash Verge está a punto de salir.
appHidden:
title: Aplicación oculta
body: Clash Verge se está ejecutando en segundo plano.
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: در آستانه خروج title: در آستانه خروج
body: Clash Verge در آستانه خروج است. body: Clash Verge در آستانه خروج است.
appHidden:
title: برنامه پنهان شد
body: Clash Verge در پس‌زمینه در حال اجراست.
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: Akan Keluar title: Akan Keluar
body: Clash Verge akan keluar. body: Clash Verge akan keluar.
appHidden:
title: Aplikasi Disembunyikan
body: Clash Verge berjalan di latar belakang.
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: 終了間近 title: 終了間近
body: Clash Verge はまもなく終了します。 body: Clash Verge はまもなく終了します。
appHidden:
title: アプリが非表示
body: Clash Verge はバックグラウンドで実行中です。
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: 곧 종료 title: 곧 종료
body: Clash Verge가 곧 종료됩니다. body: Clash Verge가 곧 종료됩니다.
appHidden:
title: 앱이 숨겨짐
body: Clash Verge가 백그라운드에서 실행 중입니다.
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: Скорый выход title: Скорый выход
body: Clash Verge скоро завершит работу. body: Clash Verge скоро завершит работу.
appHidden:
title: Приложение скрыто
body: Clash Verge работает в фоновом режиме.
updateReady: updateReady:
title: Обновление Clash Verge title: Обновление Clash Verge
body: Новая версия (v{version}) скачана и готова к установке. body: Новая версия (v{version}) скачана и готова к установке.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: Çıkış Yapılmak Üzere title: Çıkış Yapılmak Üzere
body: Clash Verge kapanmak üzere. body: Clash Verge kapanmak üzere.
appHidden:
title: Uygulama Gizlendi
body: Clash Verge arka planda çalışıyor.
updateReady: updateReady:
title: Clash Verge Güncellemesi title: Clash Verge Güncellemesi
body: Yeni bir sürüm (v{version}) indirildi ve kurulmaya hazır. body: Yeni bir sürüm (v{version}) indirildi ve kurulmaya hazır.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: Чыгар алдыннан title: Чыгар алдыннан
body: Clash Verge чыгарга җыена. body: Clash Verge чыгарга җыена.
appHidden:
title: Кушымта яшерелде
body: Clash Verge фон режимында эшли.
updateReady: updateReady:
title: Clash Verge Update title: Clash Verge Update
body: A new version (v{version}) has been downloaded and is ready to install. body: A new version (v{version}) has been downloaded and is ready to install.
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: 即将退出 title: 即将退出
body: Clash Verge 即将退出。 body: Clash Verge 即将退出。
appHidden:
title: 应用已隐藏
body: Clash Verge 正在后台运行。
updateReady: updateReady:
title: Clash Verge 更新 title: Clash Verge 更新
body: 新版本 (v{version}) 已下载完成,是否立即安装? body: 新版本 (v{version}) 已下载完成,是否立即安装?
-3
View File
@@ -29,9 +29,6 @@ notifications:
appQuit: appQuit:
title: 即將退出 title: 即將退出
body: Clash Verge 即將退出。 body: Clash Verge 即將退出。
appHidden:
title: 應用已隱藏
body: Clash Verge 正在背景執行。
updateReady: updateReady:
title: Clash Verge 更新 title: Clash Verge 更新
body: 新版本(v{version})已下載完成,是否立即安裝? body: 新版本(v{version})已下載完成,是否立即安裝?
-1
View File
@@ -200,7 +200,6 @@ impl Hotkey {
HotkeyFunction::Hide => { HotkeyFunction::Hide => {
AsyncHandler::spawn(async move || { AsyncHandler::spawn(async move || {
feat::hide().await; feat::hide().await;
notify_event(NotificationEvent::AppHidden).await;
}); });
} }
} }
-8
View File
@@ -18,8 +18,6 @@ pub enum NotificationEvent<'a> {
LightweightModeEntered, LightweightModeEntered,
ProfilesReactivated, ProfilesReactivated,
AppQuit, AppQuit,
#[cfg(target_os = "macos")]
AppHidden,
} }
/// Whether no app window can currently show the failure. /// Whether no app window can currently show the failure.
@@ -95,11 +93,5 @@ pub async fn notify_event<'a>(event: NotificationEvent<'a>) {
let body = clash_verge_i18n::t!("notifications.appQuit.body"); let body = clash_verge_i18n::t!("notifications.appQuit.body");
notify(title, body); notify(title, body);
} }
#[cfg(target_os = "macos")]
NotificationEvent::AppHidden => {
let title = clash_verge_i18n::t!("notifications.appHidden.title");
let body = clash_verge_i18n::t!("notifications.appHidden.body");
notify(title, body);
}
} }
} }