From a9c859f022922f6c5c34e9178f5aebf78d6daa5b Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Tue, 6 Jun 2023 18:41:19 -0700 Subject: [PATCH] fix: web component modals --- _data/serverState.ts | 4 +- _webGui/callbackTest.page | 7 +- app.vue | 57 +--------------- assets/main.css | 48 ++++++++++++++ components/Brand/Loading.vue | 73 ++++----------------- components/Modal.vue | 70 +++++++++++--------- components/Modals.ce.vue | 26 ++++++++ components/UserProfile.ce.vue | 3 - components/UserProfile/CallbackFeedback.vue | 16 +++-- components/UserProfile/Promo.vue | 14 ++-- composables/useFocusTrap.js | 42 ++++++++++++ layouts/default.vue | 9 +++ nuxt.config.ts | 4 ++ package-lock.json | 13 ++++ package.json | 3 +- pages/index.vue | 49 ++++++++++++++ pages/webComponents.vue | 49 ++++++++++++++ store/callback.ts | 23 +++++-- 18 files changed, 338 insertions(+), 172 deletions(-) create mode 100644 components/Modals.ce.vue create mode 100644 composables/useFocusTrap.js create mode 100644 layouts/default.vue create mode 100644 pages/index.vue create mode 100644 pages/webComponents.vue diff --git a/_data/serverState.ts b/_data/serverState.ts index dee84c613..8f38fa463 100644 --- a/_data/serverState.ts +++ b/_data/serverState.ts @@ -46,8 +46,8 @@ const serverState = { expireTime, lanIp: '192.168.0.1', locale: 'en', - pluginInstalled: true, - registered: true, + pluginInstalled: false, + registered: false, site: 'http://localhost:4321', state, uptime, diff --git a/_webGui/callbackTest.page b/_webGui/callbackTest.page index 0f21a0810..ae54ef484 100644 --- a/_webGui/callbackTest.page +++ b/_webGui/callbackTest.page @@ -10,11 +10,12 @@ $myservers = file_exists($myservers_flash_cfg_path) ? @parse_ini_file($myservers // extract web component JS file from manifest $jsonManifest = file_get_contents('/usr/local/emhttp/plugins/dynamix.my.servers/webComponents/manifest.json'); $jsonManifestData = json_decode($jsonManifest, true); -$webComponentFile = $jsonManifestData["connect-components.client.mjs"]["file"]; +$webComponentJsFile = $jsonManifestData["connect-components.client.mjs"]["file"]; // web component -$localSource = '/plugins/dynamix.my.servers/webComponents/' . $webComponentFile; +$localSourceBasePath = '/plugins/dynamix.my.servers/webComponents/'; +$localSourceJs = $localSourceBasePath . $webComponentJsFile; // add the web component source to the DOM -echo ''; +echo ''; /** * Build vars for user profile prop diff --git a/app.vue b/app.vue index 0d07d7915..49ad1c6da 100644 --- a/app.vue +++ b/app.vue @@ -1,6 +1,4 @@ - - \ No newline at end of file diff --git a/assets/main.css b/assets/main.css index 6b5d72465..82f621fe3 100644 --- a/assets/main.css +++ b/assets/main.css @@ -40,4 +40,52 @@ body { border-bottom: 11px solid var(--color-alpha); border-left: 11px solid transparent; } +} + +.BrandLoading_2, +.BrandLoading_4 { + animation: mark_2 1.5s ease infinite; +} +.BrandLoading_3 { + animation: mark_3 1.5s ease infinite; +} +.BrandLoading_6, +.BrandLoading_8 { + animation: mark_6 1.5s ease infinite; +} +.BrandLoading_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); + } } \ No newline at end of file diff --git a/components/Brand/Loading.vue b/components/Brand/Loading.vue index 7f0293439..28dda612a 100644 --- a/components/Brand/Loading.vue +++ b/components/Brand/Loading.vue @@ -1,4 +1,7 @@ - - \ No newline at end of file diff --git a/components/Modal.vue b/components/Modal.vue index afc872c5b..ed2f0e39e 100644 --- a/components/Modal.vue +++ b/components/Modal.vue @@ -1,9 +1,7 @@ diff --git a/components/Modals.ce.vue b/components/Modals.ce.vue new file mode 100644 index 000000000..10bb9de3c --- /dev/null +++ b/components/Modals.ce.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/components/UserProfile.ce.vue b/components/UserProfile.ce.vue index ca223e65b..79e0c9b72 100644 --- a/components/UserProfile.ce.vue +++ b/components/UserProfile.ce.vue @@ -81,9 +81,6 @@ onBeforeMount(() => {