diff --git a/frontend/src/components/Details/Info/GameInfo.vue b/frontend/src/components/Details/Info/GameInfo.vue index d4418842a..3412c6044 100644 --- a/frontend/src/components/Details/Info/GameInfo.vue +++ b/frontend/src/components/Details/Info/GameInfo.vue @@ -246,8 +246,10 @@ function onFilterClick(filter: FilterType, value: string) { - -
+ +
Data provided by .
-
+
Cover art provided by {{ coverImageSource }}(); @@ -112,70 +110,16 @@ function onCardClick(save: SaveSchema, event: MouseEvent) { :key="save.id" cols="6" sm="4" - class="pa-1" + class="pa-1 align-self-end" > - - - - - - - mdi-download - - - mdi-delete - - - - - {{ save.file_name }} - - - - - {{ save.emulator }} - - - - - {{ formatBytes(save.file_size_bytes) }} - - - -
- {{ t("rom.updated") }}: - {{ formatTimestamp(save.updated_at, locale) }} - ({{ formatRelativeDate(save.updated_at) }}) -
-
-
-
-
-
+ diff --git a/frontend/src/components/Details/States.vue b/frontend/src/components/Details/States.vue index 2aba18ff9..146b81012 100644 --- a/frontend/src/components/Details/States.vue +++ b/frontend/src/components/Details/States.vue @@ -2,16 +2,13 @@ import type { Emitter } from "mitt"; import { storeToRefs } from "pinia"; import { inject, ref } from "vue"; -import { useI18n } from "vue-i18n"; import type { StateSchema } from "@/__generated__"; import EmptySates from "@/components/common/EmptyStates/EmptyStates.vue"; +import AssetCard from "@/components/common/Game/AssetCard.vue"; import storeAuth from "@/stores/auth"; import { type DetailedRom } from "@/stores/roms"; import type { Events } from "@/types/emitter"; -import { formatBytes, formatTimestamp, formatRelativeDate } from "@/utils"; -import { getEmptyCoverImage } from "@/utils/covers"; -const { t, locale } = useI18n(); const auth = storeAuth(); const { scopes } = storeToRefs(auth); const props = defineProps<{ rom: DetailedRom }>(); @@ -115,88 +112,16 @@ function onCardClick(state: StateSchema, event: MouseEvent) { :key="state.id" cols="6" sm="4" - class="pa-1" + class="pa-1 align-self-end" > - - - - - - - - - - mdi-download - - - mdi-delete - - - - - - - - {{ state.file_name }} - - - - - {{ state.emulator }} - - - - - {{ formatBytes(state.file_size_bytes) }} - - - -
- {{ t("rom.updated") }}: - {{ formatTimestamp(state.updated_at, locale) }} - ({{ formatRelativeDate(state.updated_at) }}) -
-
-
-
-
-
+ diff --git a/frontend/src/components/common/Game/AssetCard.vue b/frontend/src/components/common/Game/AssetCard.vue new file mode 100644 index 000000000..058721804 --- /dev/null +++ b/frontend/src/components/common/Game/AssetCard.vue @@ -0,0 +1,177 @@ + + + diff --git a/frontend/src/components/common/Game/Dialog/Asset/SelectSave.vue b/frontend/src/components/common/Game/Dialog/Asset/SelectSave.vue index 6dc96078b..8edbfa891 100644 --- a/frontend/src/components/common/Game/Dialog/Asset/SelectSave.vue +++ b/frontend/src/components/common/Game/Dialog/Asset/SelectSave.vue @@ -4,13 +4,12 @@ import { inject, ref } from "vue"; import { useI18n } from "vue-i18n"; import { useDisplay } from "vuetify"; import type { SaveSchema } from "@/__generated__"; +import AssetCard from "@/components/common/Game/AssetCard.vue"; import RDialog from "@/components/common/RDialog.vue"; import type { DetailedRom } from "@/stores/roms"; import type { Events } from "@/types/emitter"; -import { formatBytes, formatTimestamp } from "@/utils"; -import { getEmptyCoverImage } from "@/utils/covers"; -const { t, locale } = useI18n(); +const { t } = useI18n(); const { mdAndUp } = useDisplay(); const show = ref(false); const rom = ref(null); @@ -38,67 +37,43 @@ function closeDialog() {