implemented rights and fixed some appearance bugs

This commit is contained in:
2024-03-26 22:54:13 +01:00
parent 3f88f6b821
commit 944b7d0503
19 changed files with 239 additions and 1009 deletions

View File

@ -22,10 +22,13 @@ import { computed } from 'vue';
const store = useStore();
const modeChanged = computed(() => store.state.updateDarkMode);
const modeChangedLocalstorage = computed(() => store.state.modeDashboard);
const darkMode = ref('');
const getSession = async () => {
if (modeChangedLocalstorage.value) {
store.commit('resetModeDashboardChanged');
}
const loggedInUserDarkModeBool = getItem('logged-in-user-darkMode');
if (loggedInUserDarkModeBool == 1) {
darkMode.value = true;
@ -43,6 +46,7 @@ function getItem(item) {
}
watch(modeChanged, getSession)
watch(modeChangedLocalstorage, getSession)
onMounted(async () => {
await getSession();