diff --git a/src/App.vue b/src/App.vue index c63cf7bf4..81fcf611c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -36,15 +36,17 @@ import AccountDeleteService from '@/services/accountDelete' import {useColorScheme} from '@/composables/useColorScheme' import {useBodyClass} from '@/composables/useBodyClass' +import {useAuthStore} from './stores/auth' const store = useStore() +const authStore = useAuthStore() const router = useRouter() useBodyClass('is-touch', isTouchDevice()) const keyboardShortcutsActive = computed(() => store.state.keyboardShortcutsActive) -const authUser = computed(() => store.getters['auth/authUser']) -const authLinkShare = computed(() => store.getters['auth/authLinkShare']) +const authUser = computed(() => authStore.authUser) +const authLinkShare = computed(() => authStore.authLinkShare) const {t} = useI18n({useScope: 'global'}) @@ -58,7 +60,7 @@ watch(accountDeletionConfirm, async (accountDeletionConfirm) => { const accountDeletionService = new AccountDeleteService() await accountDeletionService.confirm(accountDeletionConfirm) success({message: t('user.deletion.confirmSuccess')}) - store.dispatch('auth/refreshUserInfo') + authStore.refreshUserInfo() }, { immediate: true }) // setup password reset redirect diff --git a/src/components/date/datepickerWithRange.vue b/src/components/date/datepickerWithRange.vue index 231812799..8546c143d 100644 --- a/src/components/date/datepickerWithRange.vue +++ b/src/components/date/datepickerWithRange.vue @@ -71,7 +71,6 @@ diff --git a/src/views/list/settings/share.vue b/src/views/list/settings/share.vue index 856155e60..c86536c97 100644 --- a/src/views/list/settings/share.vue +++ b/src/views/list/settings/share.vue @@ -41,6 +41,7 @@ import CreateEdit from '@/components/misc/create-edit.vue' import LinkSharing from '@/components/sharing/linkSharing.vue' import userTeam from '@/components/sharing/userTeam.vue' import {useConfigStore} from '@/stores/config' +import {useAuthStore} from '@/stores/auth' const {t} = useI18n({useScope: 'global'}) @@ -52,10 +53,11 @@ const title = computed(() => list.value?.title useTitle(title) const store = useStore() +const authStore = useAuthStore() const configStore = useConfigStore() const linkSharingEnabled = computed(() => configStore.linkSharingEnabled) -const userIsAdmin = computed(() => 'owner' in list.value && list.value.owner.id === store.state.auth.info.id) +const userIsAdmin = computed(() => 'owner' in list.value && list.value.owner.id === authStore.info.id) async function loadList(listId: number) { const listService = new ListService() diff --git a/src/views/namespaces/settings/share.vue b/src/views/namespaces/settings/share.vue index 25f212db9..5bcc9e063 100644 --- a/src/views/namespaces/settings/share.vue +++ b/src/views/namespaces/settings/share.vue @@ -26,20 +26,21 @@ export default { name: 'namespace-setting-share' } diff --git a/src/views/user/settings/DataExport.vue b/src/views/user/settings/DataExport.vue index 29aeb8523..7e0005d2b 100644 --- a/src/views/user/settings/DataExport.vue +++ b/src/views/user/settings/DataExport.vue @@ -44,22 +44,22 @@ export default {name: 'user-settings-data-export'} diff --git a/src/views/user/settings/EmailUpdate.vue b/src/views/user/settings/EmailUpdate.vue index ef8a3e423..96e9e42d2 100644 --- a/src/views/user/settings/EmailUpdate.vue +++ b/src/views/user/settings/EmailUpdate.vue @@ -43,18 +43,18 @@ export default { name: 'user-settings-update-email' }