refactor(frontend): drop unused params, props and api surface

Remove the never-read _revalidate argument of mutateVerge and its 16
call-site placeholders, seven never-passed props of the split chip
editor, the unconsumed refreshDecorated context member, the now-orphaned
toggleFullscreen control, the unused translate argument of the notice
message handler, the reserved-but-unset ServiceConfig.timeout field and
unreachable branches in parseNoticeExtras.
This commit is contained in:
Tunglies
2026-10-28 06:30:46 +08:00
parent 3e28b287d1
commit e56711b2db
21 changed files with 54 additions and 117 deletions
+3 -4
View File
@@ -35,7 +35,6 @@ interface IpInfo {
interface ServiceConfig {
url: string
mapping: (data: any) => IpInfo
timeout?: number // 保留timeout字段(如有需要)
}
// 可用的IP检测服务列表及字段映射
@@ -159,7 +158,7 @@ export const getIpInfo = async (): Promise<
const timeoutController = new AbortController()
const timeoutId = setTimeout(() => {
timeoutController.abort()
}, service.timeout || serviceTimeout)
}, serviceTimeout)
try {
return await asyncRetry(
@@ -168,8 +167,8 @@ export const getIpInfo = async (): Promise<
const response = await fetch(service.url, {
method: 'GET',
signal: timeoutController.signal, // AbortSignal.timeout(service.timeout || serviceTimeout),
connectTimeout: service.timeout || serviceTimeout,
signal: timeoutController.signal, // AbortSignal.timeout(serviceTimeout),
connectTimeout: serviceTimeout,
headers: {
'User-Agent': userAgent,
},