mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 07:16:51 +00:00
merge: resolve upstream/dev conflicts in export workflow branch
This commit is contained in:
9
src/services/cloudControl.ts
Normal file
9
src/services/cloudControl.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
// 数据收集服务前端接口
|
||||
|
||||
export async function initCloudControl() {
|
||||
return window.electronAPI.cloud.init()
|
||||
}
|
||||
|
||||
export function recordPage(pageName: string) {
|
||||
window.electronAPI.cloud.recordPage(pageName)
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user