From 17c7757bf6c878a764b2f684801ad2632c41cac2 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 31 Aug 2023 17:07:10 -0700 Subject: [PATCH] refactor(web): sign in / out graph mutations --- web/components/UserProfile/Dropdown.vue | 4 +- web/composables/gql/gql.ts | 10 ++ web/composables/gql/graphql.ts | 96 +++++++++---- web/store/account.fragment.ts | 13 ++ web/store/account.ts | 173 ++++++++++++++++-------- web/store/callbackActions.ts | 42 ++++-- web/store/server.ts | 71 ++-------- web/store/unraidApi.ts | 5 - 8 files changed, 257 insertions(+), 157 deletions(-) create mode 100644 web/store/account.fragment.ts diff --git a/web/components/UserProfile/Dropdown.vue b/web/components/UserProfile/Dropdown.vue index 1070ff351..cf163c8c8 100644 --- a/web/components/UserProfile/Dropdown.vue +++ b/web/components/UserProfile/Dropdown.vue @@ -3,16 +3,18 @@ import { TransitionRoot } from '@headlessui/vue'; import { storeToRefs } from 'pinia'; import { useDropdownStore } from '~/store/dropdown'; +import { useErrorsStore } from '~/store/errors'; import { useServerStore } from '~/store/server'; defineProps<{ t: any; }>(); const dropdownStore = useDropdownStore(); const { dropdownVisible } = storeToRefs(dropdownStore); +const { errors } = storeToRefs(useErrorsStore()); const { connectPluginInstalled, registered, state, stateDataError } = storeToRefs(useServerStore()); const showDefaultContent = computed(() => !showLaunchpad.value); -const showLaunchpad = computed(() => state.value === 'ENOKEYFILE' || ((connectPluginInstalled.value && !registered.value) && !stateDataError.value)); +const showLaunchpad = computed(() => state.value === 'ENOKEYFILE' || ((connectPluginInstalled.value && !registered.value) && !errors.value.length && !stateDataError.value));