mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-30 02:32:09 +08:00
fix: frontend build after bump version for tauri-plugin-mihomo
This commit is contained in:
@@ -3,8 +3,8 @@ import {
|
||||
ArrowUpwardRounded,
|
||||
MemoryRounded,
|
||||
} from '@mui/icons-material'
|
||||
import { Box, Typography } from '@mui/material'
|
||||
import type { BoxProps, SvgIconProps, TypographyProps } from '@mui/material'
|
||||
import { Box, Typography } from '@mui/material'
|
||||
import { useEffect, useRef } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
@@ -41,6 +41,8 @@ export const LayoutTraffic = () => {
|
||||
trafficRef.current.appendData({
|
||||
up: traffic?.up || 0,
|
||||
down: traffic?.down || 0,
|
||||
upTotal: traffic?.upTotal || 0,
|
||||
downTotal: traffic?.downTotal || 0,
|
||||
})
|
||||
}
|
||||
}, [traffic])
|
||||
|
||||
@@ -16,7 +16,7 @@ const sampleIntervalMs = 1000
|
||||
const frameIntervalMs = 1000 / 15
|
||||
const animationDurationMs = sampleIntervalMs
|
||||
|
||||
const zeroTraffic: Traffic = { up: 0, down: 0 }
|
||||
const zeroTraffic: Traffic = { up: 0, down: 0, upTotal: 0, downTotal: 0 }
|
||||
const createDefaultList = () =>
|
||||
Array.from({ length: maxPoint + 2 }, () => ({ ...zeroTraffic }))
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useLocalStorage } from 'foxact/use-local-storage'
|
||||
|
||||
const defaultClashLog: IClashLog = {
|
||||
enable: true,
|
||||
logLevel: 'info',
|
||||
logLevel: 'INFO',
|
||||
logFilter: 'all',
|
||||
logOrder: 'asc',
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ type LogType = ILogItem['type']
|
||||
|
||||
const DEFAULT_LOG_TYPES: LogType[] = ['debug', 'info', 'warning', 'error']
|
||||
const LOG_LEVEL_FILTERS: Record<LogLevel, LogType[]> = {
|
||||
debug: DEFAULT_LOG_TYPES,
|
||||
info: ['info', 'warning', 'error'],
|
||||
warning: ['warning', 'error'],
|
||||
error: ['error'],
|
||||
silent: [],
|
||||
DEBUG: DEFAULT_LOG_TYPES,
|
||||
INFO: ['info', 'warning', 'error'],
|
||||
WARNING: ['warning', 'error'],
|
||||
ERROR: ['error'],
|
||||
SILENT: [],
|
||||
}
|
||||
|
||||
const clampLogs = (logs: ILogItem[]): ILogItem[] =>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { MihomoWebSocket, Traffic } from 'tauri-plugin-mihomo-api'
|
||||
import { useMihomoWsSubscription } from './use-mihomo-ws-subscription'
|
||||
import { useTrafficMonitorEnhanced } from './use-traffic-monitor'
|
||||
|
||||
const FALLBACK_TRAFFIC: Traffic = { up: 0, down: 0 }
|
||||
const FALLBACK_TRAFFIC: Traffic = { up: 0, down: 0, upTotal: 0, downTotal: 0 }
|
||||
const DUPLICATE_TRAFFIC_WINDOW_MS = 50
|
||||
|
||||
let lastTrafficSignature = ''
|
||||
|
||||
Vendored
+2
@@ -142,6 +142,8 @@ interface ITrafficItem {
|
||||
up_rate?: number
|
||||
down_rate?: number
|
||||
last_updated?: number
|
||||
upTotal?: number
|
||||
downTotal?: number
|
||||
}
|
||||
|
||||
interface IFormattedTrafficData {
|
||||
|
||||
Reference in New Issue
Block a user