diff --git a/src-tauri/src/utils/resolve.rs b/src-tauri/src/utils/resolve.rs index a20379c7..990b1a0a 100644 --- a/src-tauri/src/utils/resolve.rs +++ b/src-tauri/src/utils/resolve.rs @@ -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}"); } } diff --git a/src/locales/en.json b/src/locales/en.json index 58e06f36..a39e144c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -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" } diff --git a/src/locales/fa.json b/src/locales/fa.json index 1b533dd8..7d87e5ce 100644 --- a/src/locales/fa.json +++ b/src/locales/fa.json @@ -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": "عضویت با موفقیت وارد شد" } diff --git a/src/locales/ru.json b/src/locales/ru.json index 1d753a0e..69e210b9 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -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": "Импорт подписки успешно" } diff --git a/src/locales/zh.json b/src/locales/zh.json index 16a1cf7a..e0bc3c1d 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -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": "导入订阅成功" } diff --git a/src/pages/_layout.tsx b/src/pages/_layout.tsx index 56a53616..96cdee81 100644 --- a/src/pages/_layout.tsx +++ b/src/pages/_layout.tsx @@ -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;