From 2d7d4cf0917820ca42f34dc600307981674dad5d Mon Sep 17 00:00:00 2001 From: wukko Date: Tue, 23 Jul 2024 16:04:43 +0600 Subject: [PATCH] web: add an update notification --- web/i18n/en/notification.json | 4 + .../components/misc/UpdateNotification.svelte | 102 ++++++++++++++++++ web/src/components/sidebar/Sidebar.svelte | 1 + web/src/routes/+layout.svelte | 5 + web/svelte.config.js | 3 + 5 files changed, 115 insertions(+) create mode 100644 web/i18n/en/notification.json create mode 100644 web/src/components/misc/UpdateNotification.svelte diff --git a/web/i18n/en/notification.json b/web/i18n/en/notification.json new file mode 100644 index 00000000..a9b32139 --- /dev/null +++ b/web/i18n/en/notification.json @@ -0,0 +1,4 @@ +{ + "update.title": "update is available!", + "update.subtext": "press to reload" +} diff --git a/web/src/components/misc/UpdateNotification.svelte b/web/src/components/misc/UpdateNotification.svelte new file mode 100644 index 00000000..0e2c93db --- /dev/null +++ b/web/src/components/misc/UpdateNotification.svelte @@ -0,0 +1,102 @@ + + +
+ +
+ + diff --git a/web/src/components/sidebar/Sidebar.svelte b/web/src/components/sidebar/Sidebar.svelte index 29ad6248..862071c6 100644 --- a/web/src/components/sidebar/Sidebar.svelte +++ b/web/src/components/sidebar/Sidebar.svelte @@ -83,6 +83,7 @@ bottom: 0; justify-content: center; align-items: flex-start; + z-index: 3; } #sidebar::before { diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index ed8ed818..741ec386 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -1,5 +1,6 @@