From 52606e850db52b4025bbc80e53f0c9cae63ad8cc Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 14 Mar 2023 22:39:56 +0100 Subject: [PATCH] feat(frontend): show latest tag in footer --- frontend/src/routes/+layout.svelte | 8 ++++++-- frontend/svelte.config.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 2c5f824..06675e5 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -8,7 +8,11 @@ export let data: LayoutData; - const versionMismatch = data.git_commit !== version && data.git_commit !== "[unknown]"; + const versionParts = version.split("-"); + let commit = "[unknown]"; + if (versionParts.length >= 3) commit = versionParts[2]; + + const versionMismatch = data.git_commit !== commit && data.git_commit !== "[unknown]"; @@ -23,7 +27,7 @@