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:
Tunglies
2026-07-13 11:29:25 +08:00
committed by GitHub
parent 6f9fb97b31
commit 7ca20fc4ed
44 changed files with 266 additions and 602 deletions
+4 -4
View File
@@ -10,25 +10,25 @@ type ConnectionListener = () => void
const metadataValue = (value?: string) => value || ''
export const initConnData: ConnectionMonitorData = {
const initConnData: ConnectionMonitorData = {
uploadTotal: 0,
downloadTotal: 0,
activeConnections: [],
closedConnections: [],
}
export interface ConnectionMonitorData {
interface ConnectionMonitorData {
uploadTotal: number
downloadTotal: number
activeConnections: IConnectionsItem[]
closedConnections: IConnectionsItem[]
}
export interface ConnectionSummaryData {
interface ConnectionSummaryData {
activeConnectionCount: number
}
export const initConnSummaryData: ConnectionSummaryData = {
const initConnSummaryData: ConnectionSummaryData = {
activeConnectionCount: 0,
}
+1 -1
View File
@@ -9,7 +9,7 @@ import {
useQuery,
} from '@/services/query-client'
export const RECONNECT_DELAY_MS = 1000
const RECONNECT_DELAY_MS = 1000
interface SharedSubscriptionOwner {
handleMessage: (data: string) => void
+1 -1
View File
@@ -7,7 +7,7 @@ import { useQuery } from '@/services/query-client'
import { useVerge } from './use-verge'
import { useVisibility } from './use-visibility'
export interface SystemState {
interface SystemState {
runningMode: 'Sidecar' | 'Service'
isAdminMode: boolean
isServiceOk: boolean
-8
View File
@@ -3,14 +3,6 @@ import { checkUpdateSafe } from '@/services/update'
import { useVerge } from './use-verge'
export interface UpdateInfo {
version: string
body: string
date: string
available: boolean
downloadAndInstall: (onEvent?: any) => Promise<void>
}
const LAST_CHECK_KEY = 'last_check_update'
export const readLastCheckTime = (): number | null => {
+1 -1
View File
@@ -2,7 +2,7 @@ import { use } from 'react'
import { WindowContext, type WindowContextType } from '@/providers/window'
export const useWindow = () => {
const useWindow = () => {
const context = use(WindowContext)
if (context === undefined) {
throw new Error('useWindow must be used within WindowProvider')