Merge remote-tracking branch 'upstream/dev' into codex/ts0305-01-export-module-upgrade

This commit is contained in:
aits2026
2026-03-06 10:22:36 +08:00
4 changed files with 67 additions and 5 deletions

View File

@@ -179,7 +179,9 @@ function App() {
} else {
// 协议已同意,检查数据收集同意状态
const consent = await configService.getAnalyticsConsent()
if (consent === null) {
const denyCount = await configService.getAnalyticsDenyCount()
// 如果未设置同意状态且拒绝次数小于2次显示弹窗
if (consent === null && denyCount < 2) {
setShowAnalyticsConsent(true)
}
}
@@ -226,8 +228,9 @@ function App() {
}
const handleAnalyticsDeny = async () => {
await configService.setAnalyticsConsent(false)
window.electronAPI.window.close()
const denyCount = await configService.getAnalyticsDenyCount()
await configService.setAnalyticsDenyCount(denyCount + 1)
setShowAnalyticsConsent(false)
}
// 监听启动时的更新通知