From 0e86c3c07162a4891eb8fbc0d93e75df5b15c50b Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Fri, 2 Jun 2023 16:11:24 -0700 Subject: [PATCH] refactor: convert promo from dropdown to modal --- _data/serverState.ts | 2 +- app.vue | 6 - components/Modal.vue | 48 + components/PluginPromo.ce.vue | 91 - components/UserProfile.ce.vue | 45 +- components/UserProfile/Dropdown.vue | 9 +- components/UserProfile/DropdownContent.vue | 7 +- components/UserProfile/DropdownPromo.vue | 95 -- components/UserProfile/DropdownTrigger.vue | 8 +- components/UserProfile/Promo.vue | 112 ++ nuxt.config.ts | 14 +- package-lock.json | 1748 ++++++++++---------- package.json | 1 + store/dropdown.ts | 4 - store/modal.ts | 27 + store/promo.ts | 6 +- 16 files changed, 1104 insertions(+), 1119 deletions(-) create mode 100644 components/Modal.vue delete mode 100644 components/PluginPromo.ce.vue delete mode 100644 components/UserProfile/DropdownPromo.vue create mode 100644 components/UserProfile/Promo.vue create mode 100644 store/modal.ts diff --git a/_data/serverState.ts b/_data/serverState.ts index 8e8e324b6..dd44dcfc1 100644 --- a/_data/serverState.ts +++ b/_data/serverState.ts @@ -47,7 +47,7 @@ const serverState = { lanIp: '192.168.0.1', locale: 'en', pluginInstalled: false, - registered: true, + registered: false, site: 'http://localhost:4321', state, uptime, diff --git a/app.vue b/app.vue index ef03761e8..c4016a264 100644 --- a/app.vue +++ b/app.vue @@ -24,9 +24,6 @@ onBeforeMount(() => {

KeyActionsCe


-

PluginPromoCe

- -

WanIpCheckCe


@@ -47,9 +44,6 @@ onBeforeMount(() => {

KeyActionsCe


-

PluginPromoCe

- -

WanIpCheckCe


diff --git a/components/Modal.vue b/components/Modal.vue new file mode 100644 index 000000000..0f04e7d40 --- /dev/null +++ b/components/Modal.vue @@ -0,0 +1,48 @@ + + + diff --git a/components/PluginPromo.ce.vue b/components/PluginPromo.ce.vue deleted file mode 100644 index 7433015d3..000000000 --- a/components/PluginPromo.ce.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - - - diff --git a/components/UserProfile.ce.vue b/components/UserProfile.ce.vue index c0a1f789e..4a37c8d7f 100644 --- a/components/UserProfile.ce.vue +++ b/components/UserProfile.ce.vue @@ -1,11 +1,8 @@ diff --git a/components/UserProfile/Dropdown.vue b/components/UserProfile/Dropdown.vue index 26528302e..caa1c3f60 100644 --- a/components/UserProfile/Dropdown.vue +++ b/components/UserProfile/Dropdown.vue @@ -1,15 +1,15 @@ - - - - diff --git a/components/UserProfile/DropdownTrigger.vue b/components/UserProfile/DropdownTrigger.vue index af633513d..e76133672 100644 --- a/components/UserProfile/DropdownTrigger.vue +++ b/components/UserProfile/DropdownTrigger.vue @@ -4,8 +4,6 @@ import { InformationCircleIcon, ExclamationTriangleIcon } from '@heroicons/vue/2 import { useDropdownStore } from '~/store/dropdown'; import { useServerStore } from '~/store/server'; -defineEmits(['click']); - const dropdownStore = useDropdownStore(); const { dropdownVisible } = storeToRefs(dropdownStore); const { @@ -17,9 +15,7 @@ const { username, } = storeToRefs(useServerStore()); -const registeredAndPluginInstalled = computed(() => { - return pluginInstalled.value && registered.value; -}); +const registeredAndPluginInstalled = computed(() => pluginInstalled.value && registered.value); const text = computed((): string | undefined => { if ((stateData.value.error) && state.value !== 'EEXPIRED') return 'Fix Error'; @@ -42,7 +38,7 @@ const title = computed((): string => {