From 472e3fdba2691cefd46a699fc0b80b28bbeb07d7 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 20 Jul 2023 16:29:45 -0700 Subject: [PATCH] refactor: callback finished refreshServerState --- assets/main.css | 65 --------- components/Brand/Loading.vue | 4 +- components/Modals.ce.vue | 65 +++++++++ components/UserProfile.ce.vue | 67 +++++++++ components/UserProfile/CallbackFeedback.vue | 19 +-- .../UserProfile/DropdownConnectStatus.vue | 28 ++-- composables/gql/gql.ts | 20 --- composables/gql/graphql.ts | 38 +---- composables/services/webgui.ts | 6 + package-lock.json | 4 +- package.json | 1 + store/callbackActions.ts | 4 + store/server.fragment.ts | 32 ----- store/server.ts | 130 +++++++++--------- store/unraidApi.ts | 44 +++++- 15 files changed, 278 insertions(+), 249 deletions(-) diff --git a/assets/main.css b/assets/main.css index c09692cde..a643e46d3 100644 --- a/assets/main.css +++ b/assets/main.css @@ -24,70 +24,5 @@ body { --ring-shadow: 0 0 --var(--color-beta); } -.DropdownWrapper_blip { - box-shadow: var(--ring-offset-shadow), var(--ring-shadow), var(--shadow-beta); - - &::before { - @apply absolute z-20 block; - - content: ''; - width: 0; - height: 0; - top: -10px; - right: 42px; - border-right: 11px solid transparent; - border-bottom: 11px solid var(--color-alpha); - border-left: 11px solid transparent; - } -} - -.unraid_mark_2, -.unraid_mark_4 { - animation: mark_2 1.5s ease infinite; -} -.unraid_mark_3 { - animation: mark_3 1.5s ease infinite; -} -.unraid_mark_6, -.unraid_mark_8 { - animation: mark_6 1.5s ease infinite; -} -.unraid_mark_7 { - animation: mark_7 1.5s ease infinite; -} - -@keyframes mark_2 { - 50% { - transform: translateY(-40px); - } - 100% { - transform: translateY(0); - } -} -@keyframes mark_3 { - 50% { - transform: translateY(-62px); - } - 100% { - transform: translateY(0); - } -} -@keyframes mark_6 { - 50% { - transform: translateY(40px); - } - 100% { - transform: translateY(0); - } -} -@keyframes mark_7 { - 50% { - transform: translateY(62px); - } - 100% { - transform: translateY(0); - } -} - /* Ensure this is always at the bottom – @see https://tailwindcss.com/docs/content-configuration#working-with-third-party-libraries */ @tailwind utilities; diff --git a/components/Brand/Loading.vue b/components/Brand/Loading.vue index 41d2de74e..a13f4b0e9 100644 --- a/components/Brand/Loading.vue +++ b/components/Brand/Loading.vue @@ -5,14 +5,12 @@ import '~/assets/main.css'; export interface Props { gradientStart?: string; gradientStop?: string; - height?: number, title?: string, } withDefaults(defineProps(), { gradientStart: '#e32929', gradientStop: '#ff8d30', - height: 64, title: 'Loading', }); @@ -22,7 +20,7 @@ withDefaults(defineProps(), { xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 133.52 76.97" - :class="`unraid_mark h-[${height}px]`" + :class="`unraid_mark`" role="img" > {{ title }} diff --git a/components/Modals.ce.vue b/components/Modals.ce.vue index 5e2466cde..aa76f0fc8 100644 --- a/components/Modals.ce.vue +++ b/components/Modals.ce.vue @@ -24,4 +24,69 @@ const { trialModalVisible } = storeToRefs(useTrialStore()); @tailwind base; @tailwind components; @tailwind utilities; + +.DropdownWrapper_blip { + box-shadow: var(--ring-offset-shadow), var(--ring-shadow), var(--shadow-beta); + + &::before { + @apply absolute z-20 block; + + content: ''; + width: 0; + height: 0; + top: -10px; + right: 42px; + border-right: 11px solid transparent; + border-bottom: 11px solid var(--color-alpha); + border-left: 11px solid transparent; + } +} + +.unraid_mark_2, +.unraid_mark_4 { + animation: mark_2 1.5s ease infinite; +} +.unraid_mark_3 { + animation: mark_3 1.5s ease infinite; +} +.unraid_mark_6, +.unraid_mark_8 { + animation: mark_6 1.5s ease infinite; +} +.unraid_mark_7 { + animation: mark_7 1.5s ease infinite; +} + +@keyframes mark_2 { + 50% { + transform: translateY(-40px); + } + 100% { + transform: translateY(0); + } +} +@keyframes mark_3 { + 50% { + transform: translateY(-62px); + } + 100% { + transform: translateY(0); + } +} +@keyframes mark_6 { + 50% { + transform: translateY(40px); + } + 100% { + transform: translateY(0); + } +} +@keyframes mark_7 { + 50% { + transform: translateY(62px); + } + 100% { + transform: translateY(0); + } +} diff --git a/components/UserProfile.ce.vue b/components/UserProfile.ce.vue index 215f38d61..4a2c98c85 100644 --- a/components/UserProfile.ce.vue +++ b/components/UserProfile.ce.vue @@ -75,6 +75,8 @@ onBeforeMount(() => { */ callbackStore.watcher(); }); + +watch(description, (value) => console.debug('[watch:description]', value)); diff --git a/components/UserProfile/DropdownConnectStatus.vue b/components/UserProfile/DropdownConnectStatus.vue index 5aaf63416..04f596895 100644 --- a/components/UserProfile/DropdownConnectStatus.vue +++ b/components/UserProfile/DropdownConnectStatus.vue @@ -5,28 +5,28 @@ type ApiOnlineStatus = 'online'|'offline'; const onlineStatus = ref('online'); const apiLoading = ref(false); -import { useQuery } from '@vue/apollo-composable'; +// import { useQuery } from '@vue/apollo-composable'; -import { - TEST_FRAGMENT, - TEST_QUERY, -} from './DropdownConnectStatus.fragment'; -import { useFragment } from '@/composables/gql/fragment-masking'; +// import { +// TEST_FRAGMENT, +// TEST_QUERY, +// } from './DropdownConnectStatus.fragment'; +// import { useFragment } from '@/composables/gql/fragment-masking'; -const { result: newResult } = useQuery( - TEST_QUERY, -); -const result = computed(() => useFragment(TEST_FRAGMENT, newResult.value?.cloud)); +// const { result: newResult } = useQuery( +// TEST_QUERY, +// ); +// const result = computed(() => useFragment(TEST_FRAGMENT, newResult.value?.cloud)); -watch(result, (newVal, oldVal) => { - console.log('result', newVal, oldVal); -}); +// watch(result, (newVal, oldVal) => { +// console.log('result', newVal, oldVal); +// });