mirror of
https://github.com/rommapp/romm.git
synced 2026-06-29 07:16:28 +00:00
more simple cleanup
This commit is contained in:
@@ -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)"
|
||||
>
|
||||
<v-card-text class="pa-2">
|
||||
<v-row no-gutters>
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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"
|
||||
>
|
||||
<span class="truncate max-w-[90%]">{{
|
||||
relativeTime(st.updated_at)
|
||||
formatRelativeDate(st.updated_at)
|
||||
}}</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user