diff --git a/app/components/Common/ConfirmationModal.vue b/app/components/Common/ConfirmationModal.vue index ba81324..4463d0e 100644 --- a/app/components/Common/ConfirmationModal.vue +++ b/app/components/Common/ConfirmationModal.vue @@ -42,7 +42,10 @@ onRender((ctx) => { ctx.textBaseline = "top"; ctx.fillStyle = "#ffffff"; - const rawText = typeof confirmationModal.text === "function" ? confirmationModal.text() : confirmationModal.text; + const rawText = + typeof confirmationModal.text === "function" + ? confirmationModal.text() + : confirmationModal.text; const lines = rawText.split("\n").slice(0, MAX_LINES); const totalTextHeight = lines.length * LINE_HEIGHT; const textStartY = BG_Y + Math.floor((BG_HEIGHT - totalTextHeight) / 2) - 2; diff --git a/app/components/Credits/BottomScreen.vue b/app/components/Credits/BottomScreen.vue index 73589cd..5cbc412 100644 --- a/app/components/Credits/BottomScreen.vue +++ b/app/components/Credits/BottomScreen.vue @@ -70,15 +70,33 @@ onRender((ctx) => { ctx.fillStyle = "#aaaaaa"; ctx.font = "7px NDS7"; - fillTextHCentered(ctx, $t(`creditsScreen.${id}.label`), 0, y, LOGICAL_WIDTH); + fillTextHCentered( + ctx, + $t(`creditsScreen.${id}.label`), + 0, + y, + LOGICAL_WIDTH, + ); ctx.fillStyle = "#ffffff"; ctx.font = "10px NDS10"; - fillTextHCentered(ctx, $t(`creditsScreen.${id}.author`), 0, y + CREDITS_LINE_HEIGHT, LOGICAL_WIDTH); + fillTextHCentered( + ctx, + $t(`creditsScreen.${id}.author`), + 0, + y + CREDITS_LINE_HEIGHT, + LOGICAL_WIDTH, + ); ctx.fillStyle = "#888888"; ctx.font = "7px NDS7"; - fillTextHCentered(ctx, $t(`creditsScreen.${id}.url`), 0, y + CREDITS_LINE_HEIGHT * 2, LOGICAL_WIDTH); + fillTextHCentered( + ctx, + $t(`creditsScreen.${id}.url`), + 0, + y + CREDITS_LINE_HEIGHT * 2, + LOGICAL_WIDTH, + ); } ctx.globalAlpha = store.isIntro diff --git a/app/components/Credits/TopScreen.vue b/app/components/Credits/TopScreen.vue index b506938..bb5ab7a 100644 --- a/app/components/Credits/TopScreen.vue +++ b/app/components/Credits/TopScreen.vue @@ -49,15 +49,33 @@ onRender((ctx) => { ctx.fillStyle = "#aaaaaa"; ctx.font = "7px NDS7"; - fillTextHCentered(ctx, $t(`creditsScreen.${id}.label`), 0, y, LOGICAL_WIDTH); + fillTextHCentered( + ctx, + $t(`creditsScreen.${id}.label`), + 0, + y, + LOGICAL_WIDTH, + ); ctx.fillStyle = "#ffffff"; ctx.font = "10px NDS10"; - fillTextHCentered(ctx, $t(`creditsScreen.${id}.author`), 0, y + CREDITS_LINE_HEIGHT, LOGICAL_WIDTH); + fillTextHCentered( + ctx, + $t(`creditsScreen.${id}.author`), + 0, + y + CREDITS_LINE_HEIGHT, + LOGICAL_WIDTH, + ); ctx.fillStyle = "#888888"; ctx.font = "7px NDS7"; - fillTextHCentered(ctx, $t(`creditsScreen.${id}.url`), 0, y + CREDITS_LINE_HEIGHT * 2, LOGICAL_WIDTH); + fillTextHCentered( + ctx, + $t(`creditsScreen.${id}.url`), + 0, + y + CREDITS_LINE_HEIGHT * 2, + LOGICAL_WIDTH, + ); } }); diff --git a/app/components/LagModal.vue b/app/components/LagModal.vue index 1cde7f2..4283809 100644 --- a/app/components/LagModal.vue +++ b/app/components/LagModal.vue @@ -15,14 +15,28 @@ const switch2d = () => { diff --git a/app/components/Screen.vue b/app/components/Screen.vue index b4fec8f..5c9dcef 100644 --- a/app/components/Screen.vue +++ b/app/components/Screen.vue @@ -193,7 +193,9 @@ onMounted(() => { canvas.value.addEventListener("click", handleCanvasClick); canvas.value.addEventListener("mousedown", handleCanvasMouseDown); canvas.value.addEventListener("wheel", handleCanvasWheel, { passive: true }); - canvas.value.addEventListener("touchstart", handleTouchStart, { passive: false }); + canvas.value.addEventListener("touchstart", handleTouchStart, { + passive: false, + }); canvas.value.addEventListener("touchend", handleTouchEnd, { passive: true }); canvas.value.addEventListener("mousedown", handleSwipeMouseDown); canvas.value.addEventListener("mouseup", handleSwipeMouseUp); diff --git a/app/components/Settings/BottomScreen/Menus/User/Color.vue b/app/components/Settings/BottomScreen/Menus/User/Color.vue index 395bfba..2c3788b 100644 --- a/app/components/Settings/BottomScreen/Menus/User/Color.vue +++ b/app/components/Settings/BottomScreen/Menus/User/Color.vue @@ -156,16 +156,28 @@ useKeyDown(({ key }) => { switch (key) { case "NDS_UP": - if (selectedRow > 0) { assets.audio.tinyClick.play(0.8); select(selectedCol, selectedRow - 1); } + if (selectedRow > 0) { + assets.audio.tinyClick.play(0.8); + select(selectedCol, selectedRow - 1); + } break; case "NDS_RIGHT": - if (selectedCol < GRID_SIZE - 1) { assets.audio.tinyClick.play(0.8); select(selectedCol + 1, selectedRow); } + if (selectedCol < GRID_SIZE - 1) { + assets.audio.tinyClick.play(0.8); + select(selectedCol + 1, selectedRow); + } break; case "NDS_DOWN": - if (selectedRow < GRID_SIZE - 1) { assets.audio.tinyClick.play(0.8); select(selectedCol, selectedRow + 1); } + if (selectedRow < GRID_SIZE - 1) { + assets.audio.tinyClick.play(0.8); + select(selectedCol, selectedRow + 1); + } break; case "NDS_LEFT": - if (selectedCol > 0) { assets.audio.tinyClick.play(0.8); select(selectedCol - 1, selectedRow); } + if (selectedCol > 0) { + assets.audio.tinyClick.play(0.8); + select(selectedCol - 1, selectedRow); + } break; } }); diff --git a/app/composables/useKeyDown.ts b/app/composables/useKeyDown.ts index e8f7bf7..6a5b971 100644 --- a/app/composables/useKeyDown.ts +++ b/app/composables/useKeyDown.ts @@ -13,7 +13,11 @@ export const useKeyDown = (callback: KeyDownCallback) => { if (app.lagModalOpen) return; const ndsButton = mapCodeToNDS(event.code); - if (ndsButton && document.activeElement && document.activeElement !== document.body) { + if ( + ndsButton && + document.activeElement && + document.activeElement !== document.body + ) { (document.activeElement as HTMLElement).blur(); } diff --git a/app/pages/index.vue b/app/pages/index.vue index 972cdeb..209ffcf 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -32,18 +32,18 @@ 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 }, ); -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 9a804be..2e1d10a 100644 --- a/app/stores/intro.ts +++ b/app/stores/intro.ts @@ -36,7 +36,10 @@ export const useIntroStore = defineStore("intro", { () => { const now = new Date(); const isBirthday = now.getMonth() === 3 && now.getDate() === 25; - (isBirthday ? assets.audio.birthdayStartup : assets.audio.startUp).play(); + (isBirthday + ? assets.audio.birthdayStartup + : assets.audio.startUp + ).play(); }, undefined, delay, diff --git a/nuxt.config.ts b/nuxt.config.ts index b2a84a0..263873a 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -37,7 +37,10 @@ export default defineNuxtConfig({ { property: "og:image:type", content: "image/png" }, { property: "og:image:width", content: "1200" }, { property: "og:image:height", content: "630" }, - { property: "og:image:alt", content: "3D Nintendo DS home screen from pihkaal.me" }, + { + property: "og:image:alt", + content: "3D Nintendo DS home screen from pihkaal.me", + }, { property: "og:url", content: URL }, { property: "og:site_name", content: TITLE }, { property: "og:locale", content: "en-US" },