fix(admin): restore Vite admin source files

This commit is contained in:
2026-08-17 20:02:36 +08:00
parent 8fe3a89c36
commit ac5c0b2dd7
114 changed files with 17272 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
/**
* useAdminUiStore — global UI state for the admin panel.
*
* Tracks sidebar collapse, search, and breadcrumb state.
*/
export const useAdminUiStore = defineStore('admin-ui', () => {
/** Sidebar collapsed state */
const sidebarCollapsed = ref(false)
/** Current page search query (for inline page search) */
const pageSearch = ref('')
/** Global notification count (for badge display) */
const notificationCount = ref(0)
/** Whether any form on the current page has unsaved changes */
const hasUnsavedChanges = ref(false)
/** Toggle sidebar */
function toggleSidebar() {
sidebarCollapsed.value = !sidebarCollapsed.value
}
/** Clear page search */
function clearSearch() {
pageSearch.value = ''
}
return {
sidebarCollapsed,
pageSearch,
notificationCount,
hasUnsavedChanges,
toggleSidebar,
clearSearch,
}
})