feat(hotkey): add global reactivate_profiles shortcut (#5527)

* feat(hotkey): add global reactivate_profiles shortcut

* feat(profile): expose validation state for reactivation shortcuts
This commit is contained in:
Sline
2025-11-19 17:06:23 +08:00
committed by GitHub
parent 94b07b51d6
commit f439e93a2b
34 changed files with 134 additions and 22 deletions
+6
View File
@@ -9,6 +9,7 @@ pub enum NotificationEvent<'a> {
SystemProxyToggled,
TunModeToggled,
LightweightModeEntered,
ProfilesReactivated,
AppQuit,
#[cfg(target_os = "macos")]
AppHidden,
@@ -54,6 +55,11 @@ pub async fn notify_event<'a>(event: NotificationEvent<'a>) {
let body = rust_i18n::t!("notifications.lightweightModeEntered.body").to_string();
notify(&title, &body);
}
NotificationEvent::ProfilesReactivated => {
let title = rust_i18n::t!("notifications.profilesReactivated.title").to_string();
let body = rust_i18n::t!("notifications.profilesReactivated.body").to_string();
notify(&title, &body);
}
NotificationEvent::AppQuit => {
let title = rust_i18n::t!("notifications.appQuit.title").to_string();
let body = rust_i18n::t!("notifications.appQuit.body").to_string();