From 575200f760cf40998221d85561fcd8340d2e4eb0 Mon Sep 17 00:00:00 2001 From: Tobias Messner Date: Sun, 16 Jul 2023 20:05:18 +0200 Subject: [PATCH 1/2] Make the local dev banner warn when the configured data server is not running locally --- website/src/components/website/WebsiteNav.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/website/src/components/website/WebsiteNav.vue b/website/src/components/website/WebsiteNav.vue index b791e131..f4fc58eb 100644 --- a/website/src/components/website/WebsiteNav.vue +++ b/website/src/components/website/WebsiteNav.vue @@ -16,8 +16,9 @@ Beta development version: things may break. Use slmn.gg for the latest stable update. - - SLMN.GG is running in local development mode. + + SLMN.GG is running in local development mode. + SLMN.GG is running in local development mode but not using a local data server. @@ -148,6 +149,10 @@ export default { siteMode() { return import.meta.env.VITE_DEPLOY_MODE || import.meta.env.NODE_ENV; }, + dataServerMode() { + const dataServerURL = new URL(import.meta.env.VITE_DATA_SERVER); + return ["localhost", "127.0.0.1"].includes(dataServerURL.hostname) ? "local" : "remote"; + }, navbarEvents() { if (!this.minisite?.id) return []; const events = ReactiveRoot(this.minisite.id, { From f5a8a3ec2d946d1bc655d8c88e7a7372913a66b5 Mon Sep 17 00:00:00 2001 From: Tobias Messner Date: Sun, 16 Jul 2023 21:27:18 +0200 Subject: [PATCH 2/2] Don't change banner color --- website/src/components/website/WebsiteNav.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/components/website/WebsiteNav.vue b/website/src/components/website/WebsiteNav.vue index f4fc58eb..7ef96f88 100644 --- a/website/src/components/website/WebsiteNav.vue +++ b/website/src/components/website/WebsiteNav.vue @@ -16,9 +16,9 @@ Beta development version: things may break. Use slmn.gg for the latest stable update. - - SLMN.GG is running in local development mode. - SLMN.GG is running in local development mode but not using a local data server. + + + SLMN.GG is running in local development mode but not using a local data server.