From 52bbcbc984f22c23cb33c1493c59b3136bd5df09 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 1 Jun 2023 20:12:26 -0700 Subject: [PATCH] feat: KeyActions component & general progress --- _data/serverState.ts | 6 +- app.vue | 22 +++- assets/main.css | 14 ++- components/KeyActions.ce.vue | 21 +++- components/PluginPromo.ce.vue | 2 +- components/UserProfile.ce.vue | 12 +- components/UserProfile/Dropdown.vue | 109 +----------------- .../UserProfile/DropdownConnectStatus.vue | 24 ++++ components/UserProfile/DropdownContent.vue | 109 ++++++++++++++++++ components/UserProfile/DropdownError.vue | 32 +++++ components/UserProfile/DropdownItem.vue | 2 +- components/UserProfile/DropdownLaunchpad.vue | 43 +++++++ components/UserProfile/DropdownPromo.vue | 91 +++++++++++++++ .../UserProfile/DropdownServerState.vue | 10 -- components/UserProfile/DropdownTrigger.vue | 7 +- components/UserProfile/TriangleDown.vue | 11 +- components/UserProfile/UptimeExpire.vue | 24 ++-- nuxt.config.ts | 4 + store/promo.ts | 26 +++++ store/server.ts | 13 +++ store/wanIpCheck.ts | 26 ----- 21 files changed, 428 insertions(+), 180 deletions(-) create mode 100644 components/UserProfile/DropdownConnectStatus.vue create mode 100644 components/UserProfile/DropdownContent.vue create mode 100644 components/UserProfile/DropdownError.vue create mode 100644 components/UserProfile/DropdownLaunchpad.vue create mode 100644 components/UserProfile/DropdownPromo.vue delete mode 100644 components/UserProfile/DropdownServerState.vue create mode 100644 store/promo.ts delete mode 100644 store/wanIpCheck.ts diff --git a/_data/serverState.ts b/_data/serverState.ts index b1b413af4..8e8e324b6 100644 --- a/_data/serverState.ts +++ b/_data/serverState.ts @@ -29,7 +29,7 @@ const blacklistedGuid = '154B-00EE-0700-9B50CF819816'; // EBLACKLISTED1 // EBLACKLISTED2 // ENOCONN -const state: string = 'ENOKEYFILE2'; +const state: string = 'TRIAL'; const uptime = Date.now() - 60 * 60 * 1000; // 1 hour ago let expireTime = 0; @@ -46,8 +46,8 @@ const serverState = { expireTime, lanIp: '192.168.0.1', locale: 'en', - pluginInstalled: true, - registered: false, + pluginInstalled: false, + registered: true, site: 'http://localhost:4321', state, uptime, diff --git a/app.vue b/app.vue index eb4348d4d..9dca57ce8 100644 --- a/app.vue +++ b/app.vue @@ -12,32 +12,52 @@ onBeforeMount(() => {

Vue Components

+

UserProfileCe

+

DownloadApiLogsCe

+

AuthCe

+

KeyActionsCe

+

LaunchpadCe

+

PluginPromoCe

+

WanIpCheckCe

+

CallbackHandlerCe

Web Components

+

UserProfileCe

+

DownloadApiLogsCe

+

AuthCe

+

KeyActionsCe

+

LaunchpadCe

+

PluginPromoCe

+

WanIpCheckCe

+

CallbackHandlerCe

- \ No newline at end of file diff --git a/assets/main.css b/assets/main.css index 58614f358..e0c122c56 100644 --- a/assets/main.css +++ b/assets/main.css @@ -2,6 +2,18 @@ @tailwind components; @tailwind utilities; +/* +darkTheme +alpha: '#1c1b1b', +beta: '#f2f2f2', +gamma: '#999999', + +lightTheme +alpha: '#f2f2f2', +beta: '#1c1b1b', +gamma: '#999999', +*/ + body { --color-alpha: #1c1b1b; --color-beta: #f2f2f2; @@ -23,7 +35,7 @@ body { width: 0; height: 0; top: -10px; - right: 37px; + right: 40px; border-right: 11px solid transparent; border-bottom: 11px solid var(--color-alpha); border-left: 11px solid transparent; diff --git a/components/KeyActions.ce.vue b/components/KeyActions.ce.vue index 187deb47b..01f19c26d 100644 --- a/components/KeyActions.ce.vue +++ b/components/KeyActions.ce.vue @@ -1,12 +1,27 @@ diff --git a/components/UserProfile/DropdownPromo.vue b/components/UserProfile/DropdownPromo.vue new file mode 100644 index 000000000..54e266119 --- /dev/null +++ b/components/UserProfile/DropdownPromo.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/components/UserProfile/DropdownServerState.vue b/components/UserProfile/DropdownServerState.vue deleted file mode 100644 index a14a6508e..000000000 --- a/components/UserProfile/DropdownServerState.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - \ No newline at end of file diff --git a/components/UserProfile/DropdownTrigger.vue b/components/UserProfile/DropdownTrigger.vue index f7b9dcb42..14cc63c17 100644 --- a/components/UserProfile/DropdownTrigger.vue +++ b/components/UserProfile/DropdownTrigger.vue @@ -51,18 +51,15 @@ const title = computed((): string => { class="group text-18px hover:text-alpha focus:text-alpha border border-transparent flex flex-row justify-end items-center h-full gap-x-8px outline-none focus:outline-none" :title="title" > - - - {{ text }} - + {{ text }} + - diff --git a/components/UserProfile/TriangleDown.vue b/components/UserProfile/TriangleDown.vue index da450ee35..e0ad0607b 100644 --- a/components/UserProfile/TriangleDown.vue +++ b/components/UserProfile/TriangleDown.vue @@ -1,4 +1,6 @@ \ No newline at end of file diff --git a/components/UserProfile/UptimeExpire.vue b/components/UserProfile/UptimeExpire.vue index e94918ad2..e66aa7b2a 100644 --- a/components/UserProfile/UptimeExpire.vue +++ b/components/UserProfile/UptimeExpire.vue @@ -1,31 +1,35 @@