feat: 添加通知设置功能,支持用户开启/关闭通知捕获,优化设置页功能显示,升级kotlin构建版本

This commit is contained in:
2025-11-28 11:37:33 +08:00
parent a2c5525a2e
commit 6b916a4a4b
8 changed files with 237 additions and 58 deletions

31
src/stores/settings.js Normal file
View 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'],
},
},
)