From 65fa7f6d466cb5f08ff94344f516c8125d69814c Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 30 Mar 2023 01:20:46 +0200 Subject: [PATCH] feat: add dev badge in navigation for local builds --- frontend/src/routes/+layout.svelte | 2 +- frontend/src/routes/nav/Navigation.svelte | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index bc1a590..9ef1a8a 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -26,7 +26,7 @@
- +
diff --git a/frontend/src/routes/nav/Navigation.svelte b/frontend/src/routes/nav/Navigation.svelte index cb6cd9e..2b2c33b 100644 --- a/frontend/src/routes/nav/Navigation.svelte +++ b/frontend/src/routes/nav/Navigation.svelte @@ -27,6 +27,8 @@ import { apiFetch, apiFetchClient } from "$lib/api/fetch"; import { addToast } from "$lib/toast"; + export let commit: string; + let theme: string; let currentUser: MeUser | null; let showMenu: boolean = false; @@ -113,7 +115,12 @@ expand="lg" class="mb-4" > - + + + {#if commit === "[unknown]"} + DEV + {/if} +