From 1b5bf1d528187e8553b77323755d078bd2050d7a Mon Sep 17 00:00:00 2001 From: Dennis960 <66166638+Dennis960@users.noreply.github.com> Date: Mon, 2 Sep 2024 19:52:30 +0000 Subject: [PATCH] Add differentiation between test mode and production mode --- Blumy-Server/docker-compose.yml | 1 + Blumy-Server/src/routes/+layout.svelte | 5 ++++- docker-compose.dev.yml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Blumy-Server/docker-compose.yml b/Blumy-Server/docker-compose.yml index 13b67e2..40edfd3 100644 --- a/Blumy-Server/docker-compose.yml +++ b/Blumy-Server/docker-compose.yml @@ -36,3 +36,4 @@ services: - ORIGIN=${ORIGIN:?ORIGIN not set. Set it to the URL of the server (e.g. http://localhost:3000 for dev).} - PORT=3000 + - PUBLIC_MODE=${PUBLIC_MODE:-production} diff --git a/Blumy-Server/src/routes/+layout.svelte b/Blumy-Server/src/routes/+layout.svelte index b6b1e05..2b4c58b 100644 --- a/Blumy-Server/src/routes/+layout.svelte +++ b/Blumy-Server/src/routes/+layout.svelte @@ -6,6 +6,7 @@ import { onMount } from 'svelte'; // @ts-expect-error no declaration file import { pwaInfo } from 'virtual:pwa-info'; + import { PUBLIC_MODE } from '$env/static/public'; onMount(async () => { // @ts-expect-error no declaration file @@ -34,7 +35,9 @@ > - Blumy Dashboard + Blumy Dashboard{PUBLIC_MODE === 'test' ? ' - Test' : ''}