From fefd1e171a8a5f95146d1d73b374fd60c2db04d2 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Thu, 26 Feb 2026 11:47:28 +0100 Subject: [PATCH] fix(nds): hide help button on smaller devices --- app/pages/index.vue | 6 +++++- app/stores/intro.ts | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/pages/index.vue b/app/pages/index.vue index 4bfad66..7547572 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -28,13 +28,17 @@ const isTouchDevice = () => const windowSize = useWindowSize(); +const isLargeEnough = computed( + () => windowSize.width.value / windowSize.height.value > 614 / 667, +); + watch([windowSize.width, windowSize.height], ([width, height]) => { if (width / height > 614 / 667) { if (app.booted) app.allowHints(); } else { app.disallowHints(); } -}); +}, { immediate: true }); const helpButton = useTemplateRef("helpButton"); let helpAnimation: gsap.core.Timeline | null = null; diff --git a/app/stores/intro.ts b/app/stores/intro.ts index 38cbffc..f3f491d 100644 --- a/app/stores/intro.ts +++ b/app/stores/intro.ts @@ -61,7 +61,9 @@ export const useIntroStore = defineStore("intro", { ) .call(() => { const app = useAppStore(); - app.allowHints(); + if (window.innerWidth / window.innerHeight > 614 / 667) { + app.allowHints(); + } }); },