main pages/styles
This commit is contained in:
@ -7,6 +7,7 @@ export const useStore = defineStore("store", () => {
|
||||
const pb = usePB();
|
||||
const { $i18n } = useNuxtApp();
|
||||
const menuStore = useMenuStore()
|
||||
const colorMode = useColorMode()
|
||||
|
||||
const components = ref({} as PBPageItem[]);
|
||||
const getSections = async (id: string) => {
|
||||
@ -60,9 +61,19 @@ export const useStore = defineStore("store", () => {
|
||||
return [];
|
||||
}
|
||||
|
||||
const isDark = computed({
|
||||
get() {
|
||||
return colorMode.value === "dark";
|
||||
},
|
||||
set(_isDark) {
|
||||
colorMode.preference = _isDark ? "dark" : "light";
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
currentPageID,
|
||||
components,
|
||||
isDark,
|
||||
getComponents,
|
||||
getSections,
|
||||
};
|
||||
|
Reference in New Issue
Block a user