From bae65a523a727751a13266452d245362a1d1e779 Mon Sep 17 00:00:00 2001 From: Slinetrac Date: Tue, 9 Dec 2025 13:52:42 +0800 Subject: [PATCH] chore: rename files to kebab-case and update imports --- scripts/cleanup-unused-i18n.mjs | 6 +++--- src/components/base/NoticeManager.tsx | 2 +- src/components/home/home-profile-card.tsx | 2 +- src/components/home/proxy-tun-card.tsx | 4 ++-- src/components/home/system-info-card.tsx | 2 +- src/components/profile/editor-viewer.tsx | 2 +- src/components/profile/groups-editor-viewer.tsx | 2 +- src/components/profile/profile-item.tsx | 2 +- src/components/profile/profile-more.tsx | 2 +- src/components/profile/profile-viewer.tsx | 2 +- src/components/profile/proxies-editor-viewer.tsx | 2 +- src/components/profile/rules-editor-viewer.tsx | 2 +- src/components/proxy/provider-button.tsx | 2 +- src/components/rule/provider-button.tsx | 2 +- src/components/setting/mods/auto-backup-settings.tsx | 2 +- src/components/setting/mods/backup-config-viewer.tsx | 2 +- src/components/setting/mods/backup-history-viewer.tsx | 2 +- src/components/setting/mods/backup-viewer.tsx | 2 +- src/components/setting/mods/backup-webdav-dialog.tsx | 2 +- src/components/setting/mods/clash-core-viewer.tsx | 2 +- src/components/setting/mods/clash-port-viewer.tsx | 2 +- src/components/setting/mods/controller-viewer.tsx | 2 +- src/components/setting/mods/dns-viewer.tsx | 2 +- src/components/setting/mods/external-controller-cors.tsx | 2 +- src/components/setting/mods/hotkey-viewer.tsx | 2 +- src/components/setting/mods/layout-viewer.tsx | 2 +- src/components/setting/mods/lite-mode-viewer.tsx | 2 +- src/components/setting/mods/misc-viewer.tsx | 2 +- src/components/setting/mods/network-interface-viewer.tsx | 2 +- src/components/setting/mods/sysproxy-viewer.tsx | 2 +- src/components/setting/mods/theme-viewer.tsx | 2 +- src/components/setting/mods/tun-viewer.tsx | 2 +- src/components/setting/mods/update-viewer.tsx | 2 +- src/components/setting/mods/web-ui-viewer.tsx | 2 +- src/components/setting/setting-clash.tsx | 2 +- src/components/setting/setting-system.tsx | 4 ++-- src/components/setting/setting-verge-advanced.tsx | 2 +- src/components/setting/setting-verge-basic.tsx | 2 +- ...{ProxyControlSwitches.tsx => proxy-control-switches.tsx} | 2 +- src/components/test/test-item.tsx | 2 +- src/components/test/test-viewer.tsx | 2 +- src/hooks/use-service-installer.ts | 2 +- src/hooks/use-service-uninstaller.ts | 2 +- src/hooks/use-system-state.ts | 2 +- src/pages/_layout/utils/notification-handlers.ts | 2 +- src/pages/profiles.tsx | 2 +- src/pages/settings.tsx | 2 +- src/pages/unlock.tsx | 2 +- src/services/cmds.ts | 2 +- src/services/{noticeService.ts => notice-service.ts} | 0 50 files changed, 53 insertions(+), 53 deletions(-) rename src/components/shared/{ProxyControlSwitches.tsx => proxy-control-switches.tsx} (99%) rename src/services/{noticeService.ts => notice-service.ts} (100%) diff --git a/scripts/cleanup-unused-i18n.mjs b/scripts/cleanup-unused-i18n.mjs index ce8af9c3d..45e7a9be7 100644 --- a/scripts/cleanup-unused-i18n.mjs +++ b/scripts/cleanup-unused-i18n.mjs @@ -77,9 +77,9 @@ const IGNORED_KEY_PREFIXES = new Set([ const NOTICE_METHOD_NAMES = new Set(["success", "error", "info", "warning"]); const NOTICE_SERVICE_IDENTIFIERS = new Set([ - "@/services/noticeService", - "./noticeService", - "../services/noticeService", + "@/services/notice-service", + "./notice-service", + "../services/notice-service", ]); const WHITELIST_KEYS = new Set([ diff --git a/src/components/base/NoticeManager.tsx b/src/components/base/NoticeManager.tsx index dc00eac88..8bd59c7e2 100644 --- a/src/components/base/NoticeManager.tsx +++ b/src/components/base/NoticeManager.tsx @@ -7,7 +7,7 @@ import { subscribeNotices, hideNotice, getSnapshotNotices, -} from "@/services/noticeService"; +} from "@/services/notice-service"; import type { TranslationKey } from "@/types/generated/i18n-keys"; export const NoticeManager: React.FC = () => { diff --git a/src/components/home/home-profile-card.tsx b/src/components/home/home-profile-card.tsx index 21937ff3a..e92794ba4 100644 --- a/src/components/home/home-profile-card.tsx +++ b/src/components/home/home-profile-card.tsx @@ -26,7 +26,7 @@ import { useNavigate } from "react-router"; import { useRefreshAll } from "@/hooks/use-clash-data"; import { openWebUrl, updateProfile } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import parseTraffic from "@/utils/parse-traffic"; import { EnhancedCard } from "./enhanced-card"; diff --git a/src/components/home/proxy-tun-card.tsx b/src/components/home/proxy-tun-card.tsx index e6d627613..b17ee8780 100644 --- a/src/components/home/proxy-tun-card.tsx +++ b/src/components/home/proxy-tun-card.tsx @@ -17,11 +17,11 @@ import { import { useState, useMemo, memo, FC } from "react"; import { useTranslation } from "react-i18next"; -import ProxyControlSwitches from "@/components/shared/ProxyControlSwitches"; +import ProxyControlSwitches from "@/components/shared/proxy-control-switches"; import { useSystemProxyState } from "@/hooks/use-system-proxy-state"; import { useSystemState } from "@/hooks/use-system-state"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; const LOCAL_STORAGE_TAB_KEY = "clash-verge-proxy-active-tab"; diff --git a/src/components/home/system-info-card.tsx b/src/components/home/system-info-card.tsx index c7b8cbfc4..4ec5f3b14 100644 --- a/src/components/home/system-info-card.tsx +++ b/src/components/home/system-info-card.tsx @@ -24,7 +24,7 @@ import { useServiceInstaller } from "@/hooks/use-service-installer"; import { useSystemState } from "@/hooks/use-system-state"; import { useVerge } from "@/hooks/use-verge"; import { getSystemInfo } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { checkUpdateSafe as checkUpdate } from "@/services/update"; import { version as appVersion } from "@root/package.json"; diff --git a/src/components/profile/editor-viewer.tsx b/src/components/profile/editor-viewer.tsx index 6ab2e0ae8..a6d834f7f 100644 --- a/src/components/profile/editor-viewer.tsx +++ b/src/components/profile/editor-viewer.tsx @@ -24,7 +24,7 @@ import { useTranslation } from "react-i18next"; import pac from "types-pac/pac.d.ts?raw"; import { BaseLoadingOverlay } from "@/components/base"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useThemeMode } from "@/services/states"; import debounce from "@/utils/debounce"; import getSystem from "@/utils/get-system"; diff --git a/src/components/profile/groups-editor-viewer.tsx b/src/components/profile/groups-editor-viewer.tsx index 0ccb5531f..6e0d6ced9 100644 --- a/src/components/profile/groups-editor-viewer.tsx +++ b/src/components/profile/groups-editor-viewer.tsx @@ -55,7 +55,7 @@ import { readProfileFile, saveProfileFile, } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useThemeMode } from "@/services/states"; import type { TranslationKey } from "@/types/generated/i18n-keys"; import getSystem from "@/utils/get-system"; diff --git a/src/components/profile/profile-item.tsx b/src/components/profile/profile-item.tsx index 800c10238..7d20e613b 100644 --- a/src/components/profile/profile-item.tsx +++ b/src/components/profile/profile-item.tsx @@ -34,7 +34,7 @@ import { saveProfileFile, getNextUpdateTime, } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useLoadingCache, useSetLoadingCache } from "@/services/states"; import type { TranslationKey } from "@/types/generated/i18n-keys"; import { debugLog } from "@/utils/debug"; diff --git a/src/components/profile/profile-more.tsx b/src/components/profile/profile-more.tsx index 10d9017ab..c607fa47d 100644 --- a/src/components/profile/profile-more.tsx +++ b/src/components/profile/profile-more.tsx @@ -14,7 +14,7 @@ import { useTranslation } from "react-i18next"; import { EditorViewer } from "@/components/profile/editor-viewer"; import { viewProfile, readProfileFile, saveProfileFile } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { LogViewer } from "./log-viewer"; import { ProfileBox } from "./profile-box"; diff --git a/src/components/profile/profile-viewer.tsx b/src/components/profile/profile-viewer.tsx index 34b225e9c..d441f2678 100644 --- a/src/components/profile/profile-viewer.tsx +++ b/src/components/profile/profile-viewer.tsx @@ -17,7 +17,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, Switch } from "@/components/base"; import { useProfiles } from "@/hooks/use-profiles"; import { createProfile, patchProfile } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { version } from "@root/package.json"; import { FileInput } from "./file-input"; diff --git a/src/components/profile/proxies-editor-viewer.tsx b/src/components/profile/proxies-editor-viewer.tsx index e8d4fe3b4..a44529e92 100644 --- a/src/components/profile/proxies-editor-viewer.tsx +++ b/src/components/profile/proxies-editor-viewer.tsx @@ -42,7 +42,7 @@ import { Virtuoso } from "react-virtuoso"; import { ProxyItem } from "@/components/profile/proxy-item"; import { readProfileFile, saveProfileFile } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useThemeMode } from "@/services/states"; import getSystem from "@/utils/get-system"; import parseUri from "@/utils/uri-parser"; diff --git a/src/components/profile/rules-editor-viewer.tsx b/src/components/profile/rules-editor-viewer.tsx index 0eeab9629..861e5a9cf 100644 --- a/src/components/profile/rules-editor-viewer.tsx +++ b/src/components/profile/rules-editor-viewer.tsx @@ -45,7 +45,7 @@ import { Virtuoso } from "react-virtuoso"; import { Switch } from "@/components/base"; import { RuleItem } from "@/components/profile/rule-item"; import { readProfileFile, saveProfileFile } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useThemeMode } from "@/services/states"; import type { TranslationKey } from "@/types/generated/i18n-keys"; import getSystem from "@/utils/get-system"; diff --git a/src/components/proxy/provider-button.tsx b/src/components/proxy/provider-button.tsx index 861a57aec..900901612 100644 --- a/src/components/proxy/provider-button.tsx +++ b/src/components/proxy/provider-button.tsx @@ -23,7 +23,7 @@ import { useTranslation } from "react-i18next"; import { updateProxyProvider } from "tauri-plugin-mihomo-api"; import { useProxiesData, useProxyProvidersData } from "@/hooks/use-clash-data"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import parseTraffic from "@/utils/parse-traffic"; // 样式化组件 - 类型框 diff --git a/src/components/rule/provider-button.tsx b/src/components/rule/provider-button.tsx index 59d6f651f..2db852482 100644 --- a/src/components/rule/provider-button.tsx +++ b/src/components/rule/provider-button.tsx @@ -25,7 +25,7 @@ import type { useRuleProvidersData, useRulesData, } from "@/hooks/use-clash-data"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; // 辅助组件 - 类型框 const TypeBox = styled(Box)<{ component?: React.ElementType }>(({ theme }) => ({ diff --git a/src/components/setting/mods/auto-backup-settings.tsx b/src/components/setting/mods/auto-backup-settings.tsx index c9736ec7a..d8c2790b6 100644 --- a/src/components/setting/mods/auto-backup-settings.tsx +++ b/src/components/setting/mods/auto-backup-settings.tsx @@ -11,7 +11,7 @@ import { useTranslation } from "react-i18next"; import { Switch } from "@/components/base"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; const MIN_INTERVAL_HOURS = 1; const MAX_INTERVAL_HOURS = 168; diff --git a/src/components/setting/mods/backup-config-viewer.tsx b/src/components/setting/mods/backup-config-viewer.tsx index 5b5e98231..1349fc9c3 100644 --- a/src/components/setting/mods/backup-config-viewer.tsx +++ b/src/components/setting/mods/backup-config-viewer.tsx @@ -15,7 +15,7 @@ import { useTranslation } from "react-i18next"; import { useVerge } from "@/hooks/use-verge"; import { saveWebdavConfig, createWebdavBackup } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { isValidUrl } from "@/utils/helper"; interface BackupConfigViewerProps { diff --git a/src/components/setting/mods/backup-history-viewer.tsx b/src/components/setting/mods/backup-history-viewer.tsx index 9b24ad25e..d1be64b35 100644 --- a/src/components/setting/mods/backup-history-viewer.tsx +++ b/src/components/setting/mods/backup-history-viewer.tsx @@ -35,7 +35,7 @@ import { restoreLocalBackup, restoreWebDavBackup, } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; dayjs.extend(customParseFormat); dayjs.extend(relativeTime); diff --git a/src/components/setting/mods/backup-viewer.tsx b/src/components/setting/mods/backup-viewer.tsx index 185c45d6e..17a4d8ecb 100644 --- a/src/components/setting/mods/backup-viewer.tsx +++ b/src/components/setting/mods/backup-viewer.tsx @@ -14,7 +14,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, DialogRef } from "@/components/base"; import { createLocalBackup, createWebdavBackup } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { AutoBackupSettings } from "./auto-backup-settings"; import { BackupHistoryViewer } from "./backup-history-viewer"; diff --git a/src/components/setting/mods/backup-webdav-dialog.tsx b/src/components/setting/mods/backup-webdav-dialog.tsx index 8ad0e17a0..610350cc6 100644 --- a/src/components/setting/mods/backup-webdav-dialog.tsx +++ b/src/components/setting/mods/backup-webdav-dialog.tsx @@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, BaseLoadingOverlay } from "@/components/base"; import { listWebDavBackup } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { BackupConfigViewer } from "./backup-config-viewer"; diff --git a/src/components/setting/mods/clash-core-viewer.tsx b/src/components/setting/mods/clash-core-viewer.tsx index 614617788..1cd4c31a9 100644 --- a/src/components/setting/mods/clash-core-viewer.tsx +++ b/src/components/setting/mods/clash-core-viewer.tsx @@ -21,7 +21,7 @@ import { closeAllConnections, upgradeCore } from "tauri-plugin-mihomo-api"; import { BaseDialog, DialogRef } from "@/components/base"; import { useVerge } from "@/hooks/use-verge"; import { changeClashCore, restartCore } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; const VALID_CORE = [ { diff --git a/src/components/setting/mods/clash-port-viewer.tsx b/src/components/setting/mods/clash-port-viewer.tsx index b0ed403fa..a124e29a0 100644 --- a/src/components/setting/mods/clash-port-viewer.tsx +++ b/src/components/setting/mods/clash-port-viewer.tsx @@ -15,7 +15,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, Switch } from "@/components/base"; import { useClashInfo } from "@/hooks/use-clash"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import getSystem from "@/utils/get-system"; const OS = getSystem(); diff --git a/src/components/setting/mods/controller-viewer.tsx b/src/components/setting/mods/controller-viewer.tsx index 7b1067591..7c5af0d6d 100644 --- a/src/components/setting/mods/controller-viewer.tsx +++ b/src/components/setting/mods/controller-viewer.tsx @@ -18,7 +18,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, DialogRef, Switch } from "@/components/base"; import { useClashInfo } from "@/hooks/use-clash"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; export function ControllerViewer({ ref }: { ref?: Ref }) { const { t } = useTranslation(); diff --git a/src/components/setting/mods/dns-viewer.tsx b/src/components/setting/mods/dns-viewer.tsx index b1271226b..650bae8f0 100644 --- a/src/components/setting/mods/dns-viewer.tsx +++ b/src/components/setting/mods/dns-viewer.tsx @@ -29,7 +29,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, DialogRef, Switch } from "@/components/base"; import { useClash } from "@/hooks/use-clash"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useThemeMode } from "@/services/states"; import { debugLog } from "@/utils/debug"; import getSystem from "@/utils/get-system"; diff --git a/src/components/setting/mods/external-controller-cors.tsx b/src/components/setting/mods/external-controller-cors.tsx index b4ded7c4f..9fd4139a6 100644 --- a/src/components/setting/mods/external-controller-cors.tsx +++ b/src/components/setting/mods/external-controller-cors.tsx @@ -6,7 +6,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, Switch } from "@/components/base"; import { useClash } from "@/hooks/use-clash"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; // 定义开发环境的URL列表 // 这些URL在开发模式下会被自动包含在允许的来源中 diff --git a/src/components/setting/mods/hotkey-viewer.tsx b/src/components/setting/mods/hotkey-viewer.tsx index 8052bba1c..870332388 100644 --- a/src/components/setting/mods/hotkey-viewer.tsx +++ b/src/components/setting/mods/hotkey-viewer.tsx @@ -5,7 +5,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, DialogRef, Switch } from "@/components/base"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { HotkeyInput } from "./hotkey-input"; diff --git a/src/components/setting/mods/layout-viewer.tsx b/src/components/setting/mods/layout-viewer.tsx index ebc9588df..e0988e8fc 100644 --- a/src/components/setting/mods/layout-viewer.tsx +++ b/src/components/setting/mods/layout-viewer.tsx @@ -23,7 +23,7 @@ import { DEFAULT_HOVER_DELAY } from "@/components/proxy/proxy-group-navigator"; import { useVerge } from "@/hooks/use-verge"; import { useWindowDecorations } from "@/hooks/use-window"; import { copyIconFile, getAppDir } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import getSystem from "@/utils/get-system"; import { GuardState } from "./guard-state"; diff --git a/src/components/setting/mods/lite-mode-viewer.tsx b/src/components/setting/mods/lite-mode-viewer.tsx index cabd10d32..87a4021c2 100644 --- a/src/components/setting/mods/lite-mode-viewer.tsx +++ b/src/components/setting/mods/lite-mode-viewer.tsx @@ -15,7 +15,7 @@ import { BaseDialog, DialogRef, Switch } from "@/components/base"; import { TooltipIcon } from "@/components/base/base-tooltip-icon"; import { useVerge } from "@/hooks/use-verge"; import { entry_lightweight_mode } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; export function LiteModeViewer({ ref }: { ref?: Ref }) { const { t } = useTranslation(); diff --git a/src/components/setting/mods/misc-viewer.tsx b/src/components/setting/mods/misc-viewer.tsx index 62109e070..b92051d0e 100644 --- a/src/components/setting/mods/misc-viewer.tsx +++ b/src/components/setting/mods/misc-viewer.tsx @@ -14,7 +14,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog, DialogRef, Switch } from "@/components/base"; import { TooltipIcon } from "@/components/base/base-tooltip-icon"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; export const MiscViewer = forwardRef((props, ref) => { const { t } = useTranslation(); diff --git a/src/components/setting/mods/network-interface-viewer.tsx b/src/components/setting/mods/network-interface-viewer.tsx index fec78c0c3..71db18308 100644 --- a/src/components/setting/mods/network-interface-viewer.tsx +++ b/src/components/setting/mods/network-interface-viewer.tsx @@ -8,7 +8,7 @@ import useSWR from "swr"; import { BaseDialog, DialogRef } from "@/components/base"; import { getNetworkInterfacesInfo } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; export function NetworkInterfaceViewer({ ref }: { ref?: Ref }) { const { t } = useTranslation(); diff --git a/src/components/setting/mods/sysproxy-viewer.tsx b/src/components/setting/mods/sysproxy-viewer.tsx index 7a3f43b93..b647034a2 100644 --- a/src/components/setting/mods/sysproxy-viewer.tsx +++ b/src/components/setting/mods/sysproxy-viewer.tsx @@ -39,7 +39,7 @@ import { getSystemProxy, patchVergeConfig, } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { debugLog } from "@/utils/debug"; import getSystem from "@/utils/get-system"; diff --git a/src/components/setting/mods/theme-viewer.tsx b/src/components/setting/mods/theme-viewer.tsx index 0f07f4ccc..ee8be65ce 100644 --- a/src/components/setting/mods/theme-viewer.tsx +++ b/src/components/setting/mods/theme-viewer.tsx @@ -23,7 +23,7 @@ import { BaseDialog, DialogRef } from "@/components/base"; import { EditorViewer } from "@/components/profile/editor-viewer"; import { useVerge } from "@/hooks/use-verge"; import { defaultDarkTheme, defaultTheme } from "@/pages/_theme"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; export function ThemeViewer(props: { ref?: React.Ref }) { const { ref } = props; diff --git a/src/components/setting/mods/tun-viewer.tsx b/src/components/setting/mods/tun-viewer.tsx index 02bc984b1..0b60b0db2 100644 --- a/src/components/setting/mods/tun-viewer.tsx +++ b/src/components/setting/mods/tun-viewer.tsx @@ -16,7 +16,7 @@ import { BaseDialog, DialogRef, Switch } from "@/components/base"; import { TooltipIcon } from "@/components/base/base-tooltip-icon"; import { useClash } from "@/hooks/use-clash"; import { enhanceProfiles } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import getSystem from "@/utils/get-system"; import { StackModeSwitch } from "./stack-mode-switch"; diff --git a/src/components/setting/mods/update-viewer.tsx b/src/components/setting/mods/update-viewer.tsx index 739a07c75..95e22c4fb 100644 --- a/src/components/setting/mods/update-viewer.tsx +++ b/src/components/setting/mods/update-viewer.tsx @@ -11,7 +11,7 @@ import useSWR from "swr"; import { BaseDialog, DialogRef } from "@/components/base"; import { portableFlag } from "@/pages/_layout"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useSetUpdateState, useUpdateState } from "@/services/states"; import { checkUpdateSafe as checkUpdate } from "@/services/update"; diff --git a/src/components/setting/mods/web-ui-viewer.tsx b/src/components/setting/mods/web-ui-viewer.tsx index 5229f384f..278864ec7 100644 --- a/src/components/setting/mods/web-ui-viewer.tsx +++ b/src/components/setting/mods/web-ui-viewer.tsx @@ -8,7 +8,7 @@ import { BaseDialog, BaseEmpty, DialogRef } from "@/components/base"; import { useClashInfo } from "@/hooks/use-clash"; import { useVerge } from "@/hooks/use-verge"; import { openWebUrl } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { WebUIItem } from "./web-ui-item"; diff --git a/src/components/setting/setting-clash.tsx b/src/components/setting/setting-clash.tsx index 530ae86d9..ff182f72b 100644 --- a/src/components/setting/setting-clash.tsx +++ b/src/components/setting/setting-clash.tsx @@ -12,7 +12,7 @@ import { useClash } from "@/hooks/use-clash"; import { useClashLog } from "@/hooks/use-clash-log"; import { useVerge } from "@/hooks/use-verge"; import { invoke_uwp_tool } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import getSystem from "@/utils/get-system"; import { ClashCoreViewer } from "./mods/clash-core-viewer"; diff --git a/src/components/setting/setting-system.tsx b/src/components/setting/setting-system.tsx index bcaf47f65..ebc69b8ad 100644 --- a/src/components/setting/setting-system.tsx +++ b/src/components/setting/setting-system.tsx @@ -6,10 +6,10 @@ import { mutate } from "swr"; import { DialogRef, Switch } from "@/components/base"; import { TooltipIcon } from "@/components/base/base-tooltip-icon"; -import ProxyControlSwitches from "@/components/shared/ProxyControlSwitches"; +import ProxyControlSwitches from "@/components/shared/proxy-control-switches"; import { useSystemState } from "@/hooks/use-system-state"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { GuardState } from "./mods/guard-state"; import { SettingList, SettingItem } from "./mods/setting-comp"; diff --git a/src/components/setting/setting-verge-advanced.tsx b/src/components/setting/setting-verge-advanced.tsx index 9434055f1..fa2146772 100644 --- a/src/components/setting/setting-verge-advanced.tsx +++ b/src/components/setting/setting-verge-advanced.tsx @@ -13,7 +13,7 @@ import { openDevTools, openLogsDir, } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { checkUpdateSafe as checkUpdate } from "@/services/update"; import { version } from "@root/package.json"; diff --git a/src/components/setting/setting-verge-basic.tsx b/src/components/setting/setting-verge-basic.tsx index 2f3667798..b298548da 100644 --- a/src/components/setting/setting-verge-basic.tsx +++ b/src/components/setting/setting-verge-basic.tsx @@ -10,7 +10,7 @@ import { useVerge } from "@/hooks/use-verge"; import { navItems } from "@/pages/_routers"; import { copyClashEnv } from "@/services/cmds"; import { supportedLanguages } from "@/services/i18n"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import getSystem from "@/utils/get-system"; import { BackupViewer } from "./mods/backup-viewer"; diff --git a/src/components/shared/ProxyControlSwitches.tsx b/src/components/shared/proxy-control-switches.tsx similarity index 99% rename from src/components/shared/ProxyControlSwitches.tsx rename to src/components/shared/proxy-control-switches.tsx index 4eba4bc3f..0c712e3d8 100644 --- a/src/components/shared/ProxyControlSwitches.tsx +++ b/src/components/shared/proxy-control-switches.tsx @@ -21,7 +21,7 @@ import { useServiceUninstaller } from "@/hooks/use-service-uninstaller"; import { useSystemProxyState } from "@/hooks/use-system-proxy-state"; import { useSystemState } from "@/hooks/use-system-state"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; interface ProxySwitchProps { label?: string; diff --git a/src/components/test/test-item.tsx b/src/components/test/test-item.tsx index 63c181ced..9f6743f1e 100644 --- a/src/components/test/test-item.tsx +++ b/src/components/test/test-item.tsx @@ -12,7 +12,7 @@ import { BaseLoading } from "@/components/base"; import { useListen } from "@/hooks/use-listen"; import { cmdTestDelay, downloadIconCache } from "@/services/cmds"; import delayManager from "@/services/delay"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { debugLog } from "@/utils/debug"; import { TestBox } from "./test-box"; diff --git a/src/components/test/test-viewer.tsx b/src/components/test/test-viewer.tsx index 0ca2ebc68..b69188d84 100644 --- a/src/components/test/test-viewer.tsx +++ b/src/components/test/test-viewer.tsx @@ -7,7 +7,7 @@ import { useTranslation } from "react-i18next"; import { BaseDialog } from "@/components/base"; import { useVerge } from "@/hooks/use-verge"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; interface Props { onChange: (uid: string, patch?: Partial) => void; diff --git a/src/hooks/use-service-installer.ts b/src/hooks/use-service-installer.ts index 51985980d..efb5fd3e7 100644 --- a/src/hooks/use-service-installer.ts +++ b/src/hooks/use-service-installer.ts @@ -1,7 +1,7 @@ import { useCallback } from "react"; import { installService, restartCore } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useSystemState } from "./use-system-state"; diff --git a/src/hooks/use-service-uninstaller.ts b/src/hooks/use-service-uninstaller.ts index a02c272a5..5685be600 100644 --- a/src/hooks/use-service-uninstaller.ts +++ b/src/hooks/use-service-uninstaller.ts @@ -1,7 +1,7 @@ import { useCallback } from "react"; import { restartCore, stopCore, uninstallService } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useSystemState } from "./use-system-state"; diff --git a/src/hooks/use-system-state.ts b/src/hooks/use-system-state.ts index 474a743df..58f14d55a 100644 --- a/src/hooks/use-system-state.ts +++ b/src/hooks/use-system-state.ts @@ -2,7 +2,7 @@ import { useEffect } from "react"; import useSWR from "swr"; import { getRunningMode, isAdmin, isServiceAvailable } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useVerge } from "./use-verge"; diff --git a/src/pages/_layout/utils/notification-handlers.ts b/src/pages/_layout/utils/notification-handlers.ts index 29cda855b..2b33a2c9f 100644 --- a/src/pages/_layout/utils/notification-handlers.ts +++ b/src/pages/_layout/utils/notification-handlers.ts @@ -1,4 +1,4 @@ -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; type NavigateFunction = (path: string, options?: any) => void; type TranslateFunction = (key: string) => string; diff --git a/src/pages/profiles.tsx b/src/pages/profiles.tsx index 15109e49c..03fa43ced 100644 --- a/src/pages/profiles.tsx +++ b/src/pages/profiles.tsx @@ -58,7 +58,7 @@ import { reorderProfile, updateProfile, } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useSetLoadingCache, useThemeMode } from "@/services/states"; import { debugLog } from "@/utils/debug"; diff --git a/src/pages/settings.tsx b/src/pages/settings.tsx index 448fc3508..56c365592 100644 --- a/src/pages/settings.tsx +++ b/src/pages/settings.tsx @@ -9,7 +9,7 @@ import SettingSystem from "@/components/setting/setting-system"; import SettingVergeAdvanced from "@/components/setting/setting-verge-advanced"; import SettingVergeBasic from "@/components/setting/setting-verge-basic"; import { openWebUrl } from "@/services/cmds"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { useThemeMode } from "@/services/states"; const SettingPage = () => { diff --git a/src/pages/unlock.tsx b/src/pages/unlock.tsx index c856767e5..8fcf36a9a 100644 --- a/src/pages/unlock.tsx +++ b/src/pages/unlock.tsx @@ -25,7 +25,7 @@ import { useCallback, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { BaseEmpty, BasePage } from "@/components/base"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; interface UnlockItem { name: string; diff --git a/src/services/cmds.ts b/src/services/cmds.ts index 9991eaf17..1c227acfc 100644 --- a/src/services/cmds.ts +++ b/src/services/cmds.ts @@ -2,7 +2,7 @@ import { invoke } from "@tauri-apps/api/core"; import dayjs from "dayjs"; import { getProxies, getProxyProviders } from "tauri-plugin-mihomo-api"; -import { showNotice } from "@/services/noticeService"; +import { showNotice } from "@/services/notice-service"; import { debugLog } from "@/utils/debug"; export async function copyClashEnv() { diff --git a/src/services/noticeService.ts b/src/services/notice-service.ts similarity index 100% rename from src/services/noticeService.ts rename to src/services/notice-service.ts