From 9e4e71681262a3cf8ebe83b303ec0e106220271f Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Thu, 9 Jan 2025 19:27:29 -0500 Subject: [PATCH 1/2] Rework columns in table view --- backend/models/rom.py | 2 +- frontend/src/components/Details/Title.vue | 2 +- .../src/components/common/Game/FavBtn.vue | 3 +- frontend/src/components/common/Game/Table.vue | 114 +++++++++++++----- 4 files changed, 84 insertions(+), 37 deletions(-) diff --git a/backend/models/rom.py b/backend/models/rom.py index d45f877b6..230f9ded8 100644 --- a/backend/models/rom.py +++ b/backend/models/rom.py @@ -167,7 +167,7 @@ def alternative_names(self) -> list[str]: @property def first_release_date(self) -> int: if self.igdb_metadata: - return self.igdb_metadata.get("first_release_date", 0) + return self.igdb_metadata.get("first_release_date", 0) * 1000 return 0 @property diff --git a/frontend/src/components/Details/Title.vue b/frontend/src/components/Details/Title.vue index b32cd0c4a..67539f405 100644 --- a/frontend/src/components/Details/Title.vue +++ b/frontend/src/components/Details/Title.vue @@ -11,7 +11,7 @@ import { useDisplay } from "vuetify"; const props = defineProps<{ rom: DetailedRom }>(); const { smAndDown } = useDisplay(); const releaseDate = new Date( - Number(props.rom.first_release_date) * 1000, + Number(props.rom.first_release_date), ).toLocaleDateString("en-US", { day: "2-digit", month: "short", diff --git a/frontend/src/components/common/Game/FavBtn.vue b/frontend/src/components/common/Game/FavBtn.vue index 6c193790e..26934213c 100644 --- a/frontend/src/components/common/Game/FavBtn.vue +++ b/frontend/src/components/common/Game/FavBtn.vue @@ -88,9 +88,8 @@ async function switchFromFavourites() { @click.stop="switchFromFavourites" class="translucent text-shadow" rouded="0" - size="x-small" + size="small" variant="text" - icon >{{ collectionsStore.isFav(rom) ? "mdi-star" : "mdi-star-outline" }} selectedRoms.value.map((rom) => rom.id)); @@ -170,18 +170,18 @@ onMounted(() => { +