implemented rights and fixed some appearance bugs
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user