mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-27 16:00:09 +08:00
refactor: improve notification handling and avoid backend loop with empty messages
This commit is contained in:
@@ -11,7 +11,10 @@ export const handleNoticeMessage = (
|
||||
) => {
|
||||
const handlers: Record<string, () => void> = {
|
||||
"import_sub_url::ok": () => {
|
||||
navigate("/profile", { state: { current: msg } });
|
||||
// 空 msg 传入,我们不希望导致 后端-前端-后端 死循环,这里只做提醒。
|
||||
// 未来细分事件通知时,可以考虑传入订阅 ID 或其他标识符
|
||||
// navigate("/profile", { state: { current: msg } });
|
||||
navigate("/profile");
|
||||
showNotice("success", t("Import Subscription Successful"));
|
||||
},
|
||||
"import_sub_url::error": () => {
|
||||
|
||||
@@ -13,15 +13,15 @@ import {
|
||||
sortableKeyboardCoordinates,
|
||||
} from "@dnd-kit/sortable";
|
||||
import {
|
||||
CheckBoxOutlineBlankRounded,
|
||||
CheckBoxRounded,
|
||||
ClearRounded,
|
||||
ContentPasteRounded,
|
||||
DeleteRounded,
|
||||
IndeterminateCheckBoxRounded,
|
||||
LocalFireDepartmentRounded,
|
||||
RefreshRounded,
|
||||
TextSnippetOutlined,
|
||||
CheckBoxOutlineBlankRounded,
|
||||
CheckBoxRounded,
|
||||
IndeterminateCheckBoxRounded,
|
||||
DeleteRounded,
|
||||
} from "@mui/icons-material";
|
||||
import { LoadingButton } from "@mui/lab";
|
||||
import { Box, Button, Divider, Grid, IconButton, Stack } from "@mui/material";
|
||||
|
||||
Reference in New Issue
Block a user