From 589cf463bdcb2208689345280c2ddf02d5c23753 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 23 Dec 2022 19:05:48 +0100 Subject: [PATCH] ui: improve pwa prompt --- app.vue | 1 - components/PWAPrompt.client.vue | 40 ++++++++++++--------------------- error.vue | 1 - layouts/default.vue | 1 + locales/en-US.json | 3 ++- 5 files changed, 17 insertions(+), 29 deletions(-) diff --git a/app.vue b/app.vue index 3b501b74..3f261dcb 100644 --- a/app.vue +++ b/app.vue @@ -13,5 +13,4 @@ const key = computed(() => `${currentUser.value?.server ?? currentServer.value}: - diff --git a/components/PWAPrompt.client.vue b/components/PWAPrompt.client.vue index efd4dd69..903e3c74 100644 --- a/components/PWAPrompt.client.vue +++ b/components/PWAPrompt.client.vue @@ -11,33 +11,21 @@ const { close, needRefresh, updateServiceWorker } = usePWA() role="alertdialog" aria-labelledby="pwa-toast-title" aria-describedby="pwa-toast-description" - animate animate-back-in-up md:animate-back-in-right - z11 - fixed - bottom-14 md:bottom-0 right-0 - m-2 p-4 w-100 max-w-fit - bg-base border="~ base" - rounded - text-left - shadow - flex="~ gap-4" + m-2 p5 bg="fade" relative + rounded-lg of-hidden + flex="~ col gap-3" > - logo -
-

- {{ $t('pwa.title') }} -

-
- {{ $t('pwa.message') }} -
-
- - -
+

+ {{ $t('pwa.title') }} +

+
+ +
+
diff --git a/error.vue b/error.vue index 7a83fc3e..0a6ca0c0 100644 --- a/error.vue +++ b/error.vue @@ -56,5 +56,4 @@ const reload = async () => { - diff --git a/layouts/default.vue b/layouts/default.vue index 6a855c6f..affa1395 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -53,6 +53,7 @@
+
diff --git a/locales/en-US.json b/locales/en-US.json index db65b6d9..1eec13fa 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -209,7 +209,8 @@ "dismiss": "Dismiss", "message": "@:pwa.title{','} click on the @:pwa.reload button to update.", "reload": "Reload", - "title": "New Elk update available" + "title": "New Elk update available!", + "update": "Update" }, "search": { "search_desc": "Search for people & hashtags"