diff --git a/frontend/src/AppProvider.tsx b/frontend/src/AppProvider.tsx index 13ff1bc..7131c7e 100755 --- a/frontend/src/AppProvider.tsx +++ b/frontend/src/AppProvider.tsx @@ -32,7 +32,7 @@ const defaultConfig: Config = { ...demoViewConfig, site_description: "", site_na type Access = "ok" | "login" | "turnstile"; -export interface AppState { +interface AppState { config: Config; configReady: boolean; servers: Server[]; diff --git a/frontend/src/format.ts b/frontend/src/format.ts index 7fc8cb0..da78b4f 100644 --- a/frontend/src/format.ts +++ b/frontend/src/format.ts @@ -10,7 +10,7 @@ export function percent(used: number | null, total: number | null) { return safeTotal > 0 ? Math.min(100, Math.max(0, (number(used) / safeTotal) * 100)) : 0; } -export interface FormattedBytes { +interface FormattedBytes { value: string; unit: string; } diff --git a/frontend/src/hooks/useNodeLatency.ts b/frontend/src/hooks/useNodeLatency.ts index 11dcfa9..e7df072 100755 --- a/frontend/src/hooks/useNodeLatency.ts +++ b/frontend/src/hooks/useNodeLatency.ts @@ -29,7 +29,7 @@ export interface CarrierLatencyRow { lossBars: LatencyBar[]; } -export interface NodeLatencyStats { +interface NodeLatencyStats { latencyDisplay: string; lossDisplay: string; latencyBars: LatencyBar[]; diff --git a/frontend/src/latency.ts b/frontend/src/latency.ts index c414a2c..6116d0a 100644 --- a/frontend/src/latency.ts +++ b/frontend/src/latency.ts @@ -24,7 +24,7 @@ export const CARRIER_SLOTS = [ { key: "unicom" as const, label: "联通", labelEn: "Unicom", color: "#60a5fa", aliases: ["联通", "chinaunicom", "unicom", "cucc", "cu"] }, ] as const; -export type CarrierSlot = typeof CARRIER_SLOTS[number]; +type CarrierSlot = typeof CARRIER_SLOTS[number]; function latencyTone(value: number): LatencyTone { if (value <= 60) return "good"; @@ -97,7 +97,7 @@ export function selectCarrierTasks( return selected; } -export interface LatencyBucket { +interface LatencyBucket { timestamp: number; latency: number | null; loss: number | null; diff --git a/frontend/src/transport.ts b/frontend/src/transport.ts index b809f8d..6561c87 100644 --- a/frontend/src/transport.ts +++ b/frontend/src/transport.ts @@ -40,12 +40,12 @@ export function reconnectDelay(attempt: number, randomValue = Math.random()) { return Math.min(RECONNECT_MAX_DELAY, Math.round(jitteredDelay)); } -export interface LiveTransportHandlers { +interface LiveTransportHandlers { onBatch: (updates: BatchUpdate[]) => void; onConnectedChange: (connected: boolean) => void; } -export interface LiveTransportOptions { +interface LiveTransportOptions { serverId: string | null; }