mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-29 10:02:09 +08:00
refactor: knip cleanup (#7468)
* chore(frontend): expand Knip reports * chore: remove unused Mihomo changelog sync script * refactor: remove unused value exports * refactor: remove unused type exports * refactor: remove circular route dependencies * chore(frontend): move Knip scope to config * chore(i18n): remove stale portable update message
This commit is contained in:
@@ -17,7 +17,6 @@ import type { Options as ReactMarkdownOptions } from 'react-markdown'
|
||||
|
||||
import { BaseDialog, DialogRef } from '@/components/base'
|
||||
import { useUpdate } from '@/hooks/use-update'
|
||||
import { portableFlag } from '@/pages/_layout'
|
||||
import { showNotice } from '@/services/notice-service'
|
||||
import { useSetUpdateState, useUpdateState } from '@/services/states'
|
||||
|
||||
@@ -160,10 +159,6 @@ export function UpdateViewer({ ref }: { ref?: Ref<DialogRef> }) {
|
||||
}, [updateInfo])
|
||||
|
||||
const onUpdate = useLockFn(async () => {
|
||||
if (portableFlag) {
|
||||
showNotice.error('settings.modals.update.messages.portableError')
|
||||
return
|
||||
}
|
||||
if (!updateInfo?.body) return
|
||||
if (breakChangeFlag) {
|
||||
showNotice.error('settings.modals.update.messages.breakChangeError')
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { DialogRef, TooltipIcon } from '@/components/base'
|
||||
import { useVerge } from '@/hooks/use-verge'
|
||||
import { navItems } from '@/pages/_routers'
|
||||
import { navigationItems } from '@/pages/_navigation-meta'
|
||||
import { copyClashEnv } from '@/services/cmds'
|
||||
import { supportedLanguages } from '@/services/i18n'
|
||||
import { showNotice } from '@/services/notice-service'
|
||||
@@ -187,7 +187,7 @@ const SettingVergeBasic = ({ onError }: Props) => {
|
||||
onGuard={(e) => patchVerge({ start_page: e })}
|
||||
>
|
||||
<Select size="small" sx={{ width: 140, '> div': { py: '7.5px' } }}>
|
||||
{navItems.map((page: { label: string; path: string }) => {
|
||||
{Object.values(navigationItems).map((page) => {
|
||||
return (
|
||||
<MenuItem key={page.path} value={page.path}>
|
||||
{t(page.label)}
|
||||
|
||||
Reference in New Issue
Block a user