feat: 添加通知设置功能,支持用户开启/关闭通知捕获,优化设置页功能显示,升级kotlin构建版本
This commit is contained in:
31
src/stores/settings.js
Normal file
31
src/stores/settings.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export const useSettingsStore = defineStore(
|
||||
'settings',
|
||||
() => {
|
||||
const notificationCaptureEnabled = ref(true)
|
||||
const aiAutoCategoryEnabled = ref(false)
|
||||
|
||||
const setNotificationCaptureEnabled = (value) => {
|
||||
notificationCaptureEnabled.value = !!value
|
||||
}
|
||||
|
||||
const setAiAutoCategoryEnabled = (value) => {
|
||||
aiAutoCategoryEnabled.value = !!value
|
||||
}
|
||||
|
||||
return {
|
||||
notificationCaptureEnabled,
|
||||
aiAutoCategoryEnabled,
|
||||
setNotificationCaptureEnabled,
|
||||
setAiAutoCategoryEnabled,
|
||||
}
|
||||
},
|
||||
{
|
||||
persist: {
|
||||
paths: ['notificationCaptureEnabled', 'aiAutoCategoryEnabled'],
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user