From 6e130dd96e4b8b1a983105aeb75d082c6156be38 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sat, 31 Aug 2024 22:15:39 +0200 Subject: [PATCH] Improved key success message layout for mobile, using global 'now' to prevent hydration mismatches. --- components/header/header.vue | 2 +- pages/auth/keys/+Page.vue | 40 +++++++++++++++++++++++------------- src/web/main.js | 3 ++- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/components/header/header.vue b/components/header/header.vue index abc9ade..aaf6d1d 100644 --- a/components/header/header.vue +++ b/components/header/header.vue @@ -258,7 +258,7 @@ const theme = ref(pageContext.env.theme); const user = pageContext.user; const primaryStash = pageContext.assets?.primaryStash; -const unseen = ref(pageContext.meta.unseenNotifications); +const unseen = ref(pageContext.assets?.unseenNotifications); const query = ref(pageContext.urlParsed.search.q || ''); const allowLogin = pageContext.env.allowLogin; const searchFocused = ref(false); diff --git a/pages/auth/keys/+Page.vue b/pages/auth/keys/+Page.vue index f025d5a..3be16da 100644 --- a/pages/auth/keys/+Page.vue +++ b/pages/auth/keys/+Page.vue @@ -22,14 +22,13 @@ v-if="newKey" class="newkey" > -

- Your new key identified by {{ newKey.identifier }} is - -

+

Successfully generated key with identifier {{ newKey.identifier }}:

+ +

Please store this key securely, you will not be able to retrieve it later. If you lose it, you must generate a new key.

@@ -61,7 +60,7 @@ + >{{ formatDistanceStrict(key.createdAt, now) }} ago @@ -71,7 +70,7 @@ + >{{ formatDistanceStrict(key.lastUsedAt, now) }} ago @@ -97,12 +96,13 @@