mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-24 23:06:51 +00:00
新增了一个消息推送
This commit is contained in:
@@ -63,6 +63,7 @@ export const CONFIG_KEYS = {
|
||||
NOTIFICATION_POSITION: 'notificationPosition',
|
||||
NOTIFICATION_FILTER_MODE: 'notificationFilterMode',
|
||||
NOTIFICATION_FILTER_LIST: 'notificationFilterList',
|
||||
MESSAGE_PUSH_ENABLED: 'messagePushEnabled',
|
||||
WINDOW_CLOSE_BEHAVIOR: 'windowCloseBehavior',
|
||||
|
||||
// 词云
|
||||
@@ -1362,6 +1363,15 @@ export async function setNotificationFilterList(list: string[]): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.NOTIFICATION_FILTER_LIST, list)
|
||||
}
|
||||
|
||||
export async function getMessagePushEnabled(): Promise<boolean> {
|
||||
const value = await config.get(CONFIG_KEYS.MESSAGE_PUSH_ENABLED)
|
||||
return value === true
|
||||
}
|
||||
|
||||
export async function setMessagePushEnabled(enabled: boolean): Promise<void> {
|
||||
await config.set(CONFIG_KEYS.MESSAGE_PUSH_ENABLED, enabled)
|
||||
}
|
||||
|
||||
export async function getWindowCloseBehavior(): Promise<WindowCloseBehavior> {
|
||||
const value = await config.get(CONFIG_KEYS.WINDOW_CLOSE_BEHAVIOR)
|
||||
if (value === 'tray' || value === 'quit') return value
|
||||
|
||||
Reference in New Issue
Block a user