From b372d0017618ae9efdf962fa7db22f49526149dd Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Wed, 3 Sep 2025 08:53:47 -0400 Subject: [PATCH] more simple cleanup --- frontend/src/components/Details/Saves.vue | 2 +- frontend/src/console/Layout.vue | 2 -- frontend/src/console/views/Game.vue | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/Details/Saves.vue b/frontend/src/components/Details/Saves.vue index 6795b0d5a..4f00c5d84 100644 --- a/frontend/src/components/Details/Saves.vue +++ b/frontend/src/components/Details/Saves.vue @@ -118,7 +118,7 @@ function onCardClick(save: SaveSchema, event: MouseEvent) { 'border-selected': selectedSaves.some((s) => s.id === save.id), }" :elevation="isHovering ? 20 : 3" - @click="(e) => onCardClick(save, e)" + @click="(e: MouseEvent) => onCardClick(save, e)" > diff --git a/frontend/src/console/Layout.vue b/frontend/src/console/Layout.vue index 846c7a901..d64d7ebf8 100644 --- a/frontend/src/console/Layout.vue +++ b/frontend/src/console/Layout.vue @@ -2,7 +2,6 @@ import { InputBus, InputBusSymbol } from "@/console/input/bus"; import { attachGamepad } from "@/console/input/gamepad"; import { attachKeyboard } from "@/console/input/keyboard"; -import { initializeSfx } from "@/console/utils/sfx"; import { ROUTES } from "@/plugins/router"; import { useConsoleTheme } from "@/stores/consoleTheme"; import { useIdle } from "@vueuse/core"; @@ -54,7 +53,6 @@ let detachGamepad: (() => void) | null = null; onMounted(() => { themeStore.initializeTheme(); - initializeSfx(); // Establish a root input scope so child views can subscribe safely bus.pushScope(); diff --git a/frontend/src/console/views/Game.vue b/frontend/src/console/views/Game.vue index 350ed6db1..882cc79f3 100644 --- a/frontend/src/console/views/Game.vue +++ b/frontend/src/console/views/Game.vue @@ -327,7 +327,7 @@ const currentStateId = computed( () => rom.value?.user_states?.[selectedStateIndex.value]?.id, ); -function relativeTime(date: string | Date) { +function formatRelativeDate(date: string | Date) { return formatDistanceToNow(new Date(date), { addSuffix: true }); } @@ -624,7 +624,7 @@ onUnmounted(() => { selectedStateIndex === i, }" :aria-label=" - 'State from ' + relativeTime(st.updated_at) + 'State from ' + formatRelativeDate(st.updated_at) " @click="startWithState(i)" > @@ -649,7 +649,7 @@ onUnmounted(() => { class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-black/0 px-2 pt-4 pb-1 text-[10px] text-white/80 tracking-wide flex justify-between items-end" > {{ - relativeTime(st.updated_at) + formatRelativeDate(st.updated_at) }}