mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-06-04 07:36:48 +00:00
feat: add AI insight notification toggle
This commit is contained in:
@@ -66,6 +66,7 @@ export const CONFIG_KEYS = {
|
||||
|
||||
// 通知
|
||||
NOTIFICATION_ENABLED: 'notificationEnabled',
|
||||
AI_INSIGHT_NOTIFICATION_ENABLED: 'aiInsightNotificationEnabled',
|
||||
NOTIFICATION_POSITION: 'notificationPosition',
|
||||
NOTIFICATION_FILTER_MODE: 'notificationFilterMode',
|
||||
NOTIFICATION_FILTER_LIST: 'notificationFilterList',
|
||||
@@ -1677,6 +1678,15 @@ export async function setNotificationEnabled(enabled: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.NOTIFICATION_ENABLED, enabled)
|
||||
}
|
||||
|
||||
export async function getAiInsightNotificationEnabled(): Promise<boolean> {
|
||||
const value = await config.get(CONFIG_KEYS.AI_INSIGHT_NOTIFICATION_ENABLED)
|
||||
return value !== false
|
||||
}
|
||||
|
||||
export async function setAiInsightNotificationEnabled(enabled: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.AI_INSIGHT_NOTIFICATION_ENABLED, enabled)
|
||||
}
|
||||
|
||||
// 获取通知位置
|
||||
export async function getNotificationPosition(): Promise<'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'> {
|
||||
const value = await config.get(CONFIG_KEYS.NOTIFICATION_POSITION)
|
||||
|
||||
Reference in New Issue
Block a user