This commit is contained in:
2025-11-26 15:17:27 +08:00
commit a8e4f56999
350 changed files with 25023 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
import { reactive } from 'vue'
import { PostData } from '../utils/posts.data'
interface StoreState {
selectedPosts: PostData[]
currTag: string
currPost: PostData
currPage: number
searchDialog: boolean
splashLoading: boolean
fireworksEnabled: boolean
SpinePlayerEnabled: boolean
showDropdownMenu: boolean
darkMode: 'light' | 'dark' | 'system'
}
const state: StoreState = reactive({
selectedPosts: [],
currTag: '',
currPost: {
id: 0,
title: '',
content: '',
href: '',
create: 0,
update: 0,
tags: [],
wordCount: 0,
cover: '',
excerpt: '',
pinned: false
},
currPage: 1,
searchDialog: false,
splashLoading: true,
fireworksEnabled: true,
SpinePlayerEnabled: true,
showDropdownMenu: false,
darkMode: 'system',
})
export function useStore() {
return { state }
}