Initial commit: admin dashboard for GameNo.
Vue 3 + Vite dashboard with PrimeVue, i18n, and API integration for institution management.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// /src/stores/uiStore.js
|
||||
import { defineStore } from 'pinia';
|
||||
import { ref } from 'vue';
|
||||
|
||||
export const useUiStore = defineStore('ui', () => {
|
||||
const isSidebarOpen = ref(true);
|
||||
const isMobileSidebarOpen = ref(false);
|
||||
const breadcrumbs = ref([]);
|
||||
|
||||
function toggleSidebar() {
|
||||
isSidebarOpen.value = !isSidebarOpen.value;
|
||||
}
|
||||
|
||||
function toggleMobileSidebar() {
|
||||
isMobileSidebarOpen.value = !isMobileSidebarOpen.value;
|
||||
}
|
||||
|
||||
function setBreadcrumbs(items) {
|
||||
breadcrumbs.value = items;
|
||||
}
|
||||
|
||||
return {
|
||||
isSidebarOpen,
|
||||
isMobileSidebarOpen,
|
||||
breadcrumbs,
|
||||
toggleSidebar,
|
||||
toggleMobileSidebar,
|
||||
setBreadcrumbs
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user