merge: resolve upstream/dev conflicts in export workflow branch

This commit is contained in:
tisonhuang
2026-03-05 13:55:42 +08:00
14 changed files with 301 additions and 21 deletions

View File

@@ -0,0 +1,9 @@
// 数据收集服务前端接口
export async function initCloudControl() {
return window.electronAPI.cloud.init()
}
export function recordPage(pageName: string) {
window.electronAPI.cloud.recordPage(pageName)
}

View File

@@ -61,7 +61,10 @@ export const CONFIG_KEYS = {
NOTIFICATION_FILTER_LIST: 'notificationFilterList',
// 词云
WORD_CLOUD_EXCLUDE_WORDS: 'wordCloudExcludeWords'
WORD_CLOUD_EXCLUDE_WORDS: 'wordCloudExcludeWords',
// 数据收集
ANALYTICS_CONSENT: 'analyticsConsent'
} as const
export interface WxidConfig {
@@ -1083,3 +1086,15 @@ export async function getWordCloudExcludeWords(): Promise<string[]> {
export async function setWordCloudExcludeWords(words: string[]): Promise<void> {
await config.set(CONFIG_KEYS.WORD_CLOUD_EXCLUDE_WORDS, words)
}
// 获取数据收集同意状态
export async function getAnalyticsConsent(): Promise<boolean | null> {
const value = await config.get(CONFIG_KEYS.ANALYTICS_CONSENT)
if (typeof value === 'boolean') return value
return null
}
// 设置数据收集同意状态
export async function setAnalyticsConsent(consent: boolean): Promise<void> {
await config.set(CONFIG_KEYS.ANALYTICS_CONSENT, consent)
}