feat: 增加匿名统计选项开关

This commit is contained in:
digua
2025-12-20 10:50:36 +08:00
parent 8c93e23357
commit af83ced997
6 changed files with 187 additions and 99 deletions

View File

@@ -89,6 +89,8 @@ interface Api {
checkUpdate: () => void
simulateUpdate: () => void
fetchRemoteConfig: (url: string) => Promise<{ success: boolean; data?: unknown; error?: string }>
getAnalyticsEnabled: () => Promise<boolean>
setAnalyticsEnabled: (enabled: boolean) => Promise<{ success: boolean }>
}
}
@@ -358,7 +360,10 @@ interface CacheApi {
getInfo: () => Promise<CacheInfo>
clear: (cacheId: string) => Promise<{ success: boolean; error?: string; message?: string }>
openDir: (cacheId: string) => Promise<{ success: boolean; error?: string }>
saveToDownloads: (filename: string, dataUrl: string) => Promise<{ success: boolean; filePath?: string; error?: string }>
saveToDownloads: (
filename: string,
dataUrl: string
) => Promise<{ success: boolean; filePath?: string; error?: string }>
}
declare global {