mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-30 18:52:12 +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:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user