mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
feat: Added web notification of successful subscription import
This commit is contained in:
parent
3963c60fc1
commit
dbc3723bdc
|
@ -279,6 +279,7 @@ pub async fn resolve_scheme(param: String) -> Result<()> {
|
|||
.body("Import profile success")
|
||||
.show()
|
||||
.unwrap();
|
||||
handle::Handle::notice_message("import_sub_url::ok", "ok");
|
||||
}
|
||||
Err(e) => {
|
||||
app_handle
|
||||
|
@ -288,6 +289,7 @@ pub async fn resolve_scheme(param: String) -> Result<()> {
|
|||
.body(format!("Import profile failed: {e}"))
|
||||
.show()
|
||||
.unwrap();
|
||||
handle::Handle::notice_message("import_sub_url::error", e.clone());
|
||||
bail!("Import profile failed: {e}");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -367,5 +367,6 @@
|
|||
"Clash Core Restarted": "Clash Core Restarted",
|
||||
"Switched to _clash Core": "Switched to {{core}} Core",
|
||||
"GeoData Updated": "GeoData Updated",
|
||||
"Currently on the Latest Version": "Currently on the Latest Version"
|
||||
"Currently on the Latest Version": "Currently on the Latest Version",
|
||||
"Import Subscription Successful": "Import subscription successful"
|
||||
}
|
||||
|
|
|
@ -365,5 +365,6 @@
|
|||
"Clash Core Restarted": "هسته Clash مجدداً راهاندازی شد",
|
||||
"Switched to _clash Core": "تغییر به هسته {{core}}",
|
||||
"GeoData Updated": "GeoData بهروزرسانی شد",
|
||||
"Currently on the Latest Version": "در حال حاضر در آخرین نسخه"
|
||||
"Currently on the Latest Version": "در حال حاضر در آخرین نسخه",
|
||||
"Import Subscription Successfully": "عضویت با موفقیت وارد شد"
|
||||
}
|
||||
|
|
|
@ -365,5 +365,6 @@
|
|||
"Clash Core Restarted": "Clash ядра перезапущено",
|
||||
"Switched to _clash Core": "Переключено на ядра {{core}}",
|
||||
"GeoData Updated": "GeoData Обновлена",
|
||||
"Currently on the Latest Version": "В настоящее время используется последняя версия"
|
||||
"Currently on the Latest Version": "В настоящее время используется последняя версия",
|
||||
"Import subscription successful": "Импорт подписки успешно"
|
||||
}
|
||||
|
|
|
@ -367,5 +367,6 @@
|
|||
"Clash Core Restarted": "已重启 Clash 内核",
|
||||
"Switched to _clash Core": "已切换至 {{core}} 内核",
|
||||
"GeoData Updated": "已更新 GeoData",
|
||||
"Currently on the Latest Version": "当前已是最新版本"
|
||||
"Currently on the Latest Version": "当前已是最新版本",
|
||||
"Import Subscription Successful": "导入订阅成功"
|
||||
}
|
||||
|
|
|
@ -72,6 +72,12 @@ const Layout = () => {
|
|||
listen("verge://notice-message", ({ payload }) => {
|
||||
const [status, msg] = payload as [string, string];
|
||||
switch (status) {
|
||||
case "import_sub_url::ok":
|
||||
Notice.success(t("Import Subscription Successful"));
|
||||
break;
|
||||
case "import_sub_url::error":
|
||||
Notice.error(msg);
|
||||
break;
|
||||
case "set_config::ok":
|
||||
Notice.success(t("Clash Config Updated"));
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user