fix(nds): hide help button on smaller devices

This commit is contained in:
2026-02-26 11:47:28 +01:00
parent 02e00b170a
commit 0cb1f4a5ff
2 changed files with 8 additions and 2 deletions

View File

@@ -28,13 +28,17 @@ const isTouchDevice = () =>
const windowSize = useWindowSize(); const windowSize = useWindowSize();
const isLargeEnough = computed(
() => windowSize.width.value / windowSize.height.value > 614 / 667,
);
watch([windowSize.width, windowSize.height], ([width, height]) => { watch([windowSize.width, windowSize.height], ([width, height]) => {
if (width / height > 614 / 667) { if (width / height > 614 / 667) {
if (app.booted) app.allowHints(); if (app.booted) app.allowHints();
} else { } else {
app.disallowHints(); app.disallowHints();
} }
}); }, { immediate: true });
const helpButton = useTemplateRef("helpButton"); const helpButton = useTemplateRef("helpButton");
let helpAnimation: gsap.core.Timeline | null = null; let helpAnimation: gsap.core.Timeline | null = null;

View File

@@ -61,7 +61,9 @@ export const useIntroStore = defineStore("intro", {
) )
.call(() => { .call(() => {
const app = useAppStore(); const app = useAppStore();
if (window.innerWidth / window.innerHeight > 614 / 667) {
app.allowHints(); app.allowHints();
}
}); });
}, },