This commit is contained in:
2025-12-16 19:27:20 +08:00
parent c85b46c18e
commit 430b8f12ba
89 changed files with 7166 additions and 4061 deletions

21
src/stores/appStore.js Normal file
View File

@@ -0,0 +1,21 @@
import { defineStore } from 'pinia'
export const useAppStore = defineStore('app', {
state: () => ({
queryRetentionDays: 0,
isLoaded: false,
}),
actions: {
async fetchAppConfig() {
try {
const { data, error } = await useApiFetch('/app/config').get().json()
if (data.value && !error.value && data.value.code === 200) {
const cfg = data.value.data
this.queryRetentionDays = Number(cfg.query_retention_days) || 0
}
} catch (e) {
}
this.isLoaded = true
},
},
})