From 44bda5a83815a22eb92fd616dc353b7c550b9f4c Mon Sep 17 00:00:00 2001 From: Giga Date: Mon, 9 Oct 2023 19:28:47 +1300 Subject: [PATCH] Allow the hints to be disabled Loading screen hints can be disabled by setting environment variable `VRCA_SHOW_LOADING_SCREEN_HINTS` to `"false"`. --- quasar.config.js | 1 + src/components/LoadingScreen.vue | 11 +++++++++-- src/env.d.ts | 1 + src/stores/application-store.ts | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/quasar.config.js b/quasar.config.js index cc3d654d..5e867b7f 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -102,6 +102,7 @@ module.exports = configure(function(ctx) { VRCA_BANNER_ALT: process.env.VRCA_BANNER_ALT ?? packageJSON.productName, VRCA_GLOBAL_SERVICE_TERM: process.env.VRCA_GLOBAL_SERVICE_TERM ?? "Metaverse", VRCA_VERSION_WATERMARK: process.env.VRCA_VERSION_WATERMARK ?? "Early Developer Alpha", + VRCA_SHOW_LOADING_SCREEN_HINTS: process.env.VRCA_SHOW_LOADING_SCREEN_HINTS ?? "true", // Theme > Colors VRCA_COLORS_PRIMARY: process.env.VRCA_COLORS_PRIMARY ?? "#0c71c3", VRCA_COLORS_SECONDARY: process.env.VRCA_COLORS_SECONDARY ?? "#8300e9", diff --git a/src/components/LoadingScreen.vue b/src/components/LoadingScreen.vue index c8c74d2b..06f99c45 100644 --- a/src/components/LoadingScreen.vue +++ b/src/components/LoadingScreen.vue @@ -104,7 +104,11 @@ size="xl" /> -
+
@@ -164,7 +168,10 @@ export default defineComponent({ index.value = wrap(index.value += 1); }, transition); } - window.setInterval(changeHint, delay); + + if (applicationStore.theme.showLoadingScreenHints.toLowerCase() !== "false") { + window.setInterval(changeHint, delay); + } return { applicationStore, diff --git a/src/env.d.ts b/src/env.d.ts index a3d40e86..89ceef8f 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -8,6 +8,7 @@ declare namespace NodeJS { VRCA_DEFAULT_DOMAIN_PORT: string; VRCA_DEFAULT_DOMAIN_URL: string; VRCA_GLOBAL_SERVICE_TERM: string; + VRCA_SHOW_LOADING_SCREEN_HINTS: "true" | "false"; // Theme -> Styles VRCA_DEFAULT_MODE: "light" | "dark"; VRCA_GLOBAL_STYLE: "none" | "aero" | "mica"; diff --git a/src/stores/application-store.ts b/src/stores/application-store.ts index 526d1ca7..6987370a 100644 --- a/src/stores/application-store.ts +++ b/src/stores/application-store.ts @@ -129,6 +129,7 @@ export const useApplicationStore = defineStore("application", { url: process.env.VRCA_HOSTED_URL, globalServiceTerm: process.env.VRCA_GLOBAL_SERVICE_TERM, versionWatermark: process.env.VRCA_VERSION_WATERMARK, + showLoadingScreenHints: process.env.VRCA_SHOW_LOADING_SCREEN_HINTS, colors: { primary: process.env.VRCA_COLORS_PRIMARY, secondary: process.env.VRCA_COLORS_SECONDARY,