mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-18 09:52:13 +08:00
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:
+3
-4
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user