Skip to content

Commit

Permalink
Allow the hints to be disabled
Browse files Browse the repository at this point in the history
Loading screen hints can be disabled by setting environment variable `VRCA_SHOW_LOADING_SCREEN_HINTS` to `"false"`.
  • Loading branch information
Gigabyte5671 committed Oct 9, 2023
1 parent 50104d0 commit 44bda5a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 9 additions & 2 deletions src/components/LoadingScreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@
size="xl"
/>
</div>
<div class="hint" :class="{ showNext }">
<div
v-if="applicationStore.theme.showLoadingScreenHints !== 'false'"
class="hint"
:class="{ showNext }"
>
<div v-html="hint"></div>
<div v-html="nextHint"></div>
</div>
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 1 addition & 0 deletions src/stores/application-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 44bda5a

Please sign in to comment.