From a737fc5bc2affc87b209746ecf04c66e1f6077db Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Wed, 21 Sep 2022 02:21:22 +0200 Subject: [PATCH] feat: port config store to pinia --- src/components/home/TheNavigation.vue | 6 ++-- .../list/list-settings-dropdown.vue | 6 ++-- src/components/misc/legal.vue | 9 +++--- src/components/misc/no-auth-wrapper.vue | 17 ++++++----- src/components/sharing/linkSharing.vue | 6 ++-- src/components/tasks/partials/comments.vue | 4 ++- src/helpers/checkAndSetApiUrl.ts | 6 ++-- src/models/totp.ts | 2 +- src/store/index.ts | 2 -- src/store/modules/auth.ts | 5 ++-- src/stores/config.ts | 30 +++++++++---------- src/views/About.vue | 5 ++-- src/views/Home.vue | 4 ++- src/views/list/settings/background.vue | 6 ++-- src/views/list/settings/share.vue | 5 +++- src/views/migrator/Migrate.vue | 6 ++-- src/views/user/Login.vue | 15 ++++++---- src/views/user/Settings.vue | 8 +++-- src/views/user/settings/Caldav.vue | 6 ++-- src/views/user/settings/Deletion.vue | 5 +++- src/views/user/settings/TOTP.vue | 8 ++--- 21 files changed, 93 insertions(+), 68 deletions(-) diff --git a/src/components/home/TheNavigation.vue b/src/components/home/TheNavigation.vue index 331a8aa5..0df97015 100644 --- a/src/components/home/TheNavigation.vue +++ b/src/components/home/TheNavigation.vue @@ -108,15 +108,17 @@ import BaseButton from '@/components/base/BaseButton.vue' import MenuButton from '@/components/home/MenuButton.vue' import {getListTitle} from '@/helpers/getListTitle' +import {useConfigStore} from '@/stores/config' const store = useStore() +const configStore = useConfigStore() const userInfo = computed(() => store.state.auth.info) const userAvatar = computed(() => store.state.auth.avatarUrl) const currentList = computed(() => store.state.currentList) const background = computed(() => store.state.background) -const imprintUrl = computed(() => store.state.config.legal.imprintUrl) -const privacyPolicyUrl = computed(() => store.state.config.legal.privacyPolicyUrl) +const imprintUrl = computed(() => configStore.legal.imprintUrl) +const privacyPolicyUrl = computed(() => configStore.legal.privacyPolicyUrl) const canWriteCurrentList = computed(() => store.state.currentList.maxRight > Rights.READ) const menuActive = computed(() => store.state.menuActive) diff --git a/src/components/list/list-settings-dropdown.vue b/src/components/list/list-settings-dropdown.vue index c32078a2..bcd8a80f 100644 --- a/src/components/list/list-settings-dropdown.vue +++ b/src/components/list/list-settings-dropdown.vue @@ -77,7 +77,6 @@ diff --git a/src/components/misc/legal.vue b/src/components/misc/legal.vue index 3adc9a95..3450046f 100644 --- a/src/components/misc/legal.vue +++ b/src/components/misc/legal.vue @@ -8,14 +8,13 @@