From cabfb184a43154e5cf7b9d2f03b3ff93302ae40b Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Sun, 15 Jun 2025 23:57:05 -0400 Subject: [PATCH] refine style of checks --- frontend/src/components/Details/Title.vue | 122 +++++++++++++++------- 1 file changed, 83 insertions(+), 39 deletions(-) diff --git a/frontend/src/components/Details/Title.vue b/frontend/src/components/Details/Title.vue index 6f7c65a76..c6538dc75 100644 --- a/frontend/src/components/Details/Title.vue +++ b/frontend/src/components/Details/Title.vue @@ -7,6 +7,7 @@ import type { DetailedRom } from "@/stores/roms"; import storePlatforms from "@/stores/platforms"; import { storeToRefs } from "pinia"; import { useDisplay } from "vuetify"; +import { computed } from "vue"; // Props const props = defineProps<{ rom: DetailedRom }>(); @@ -21,6 +22,43 @@ const releaseDate = new Date( const platformsStore = storePlatforms(); const { allPlatforms } = storeToRefs(platformsStore); + +const hashMatches = computed(() => { + return [ + { + name: "TOSEC", + match: props.rom.hasheous_metadata?.tosec_match, + }, + { + name: "NoIntro", + match: props.rom.hasheous_metadata?.nointro_match, + }, + { + name: "Redump", + match: props.rom.hasheous_metadata?.redump_match, + }, + { + name: "FBNeo", + match: props.rom.hasheous_metadata?.fbneo_match, + }, + { + name: "MAMEArcade", + match: props.rom.hasheous_metadata?.mame_arcade_match, + }, + { + name: "MAMEMess", + match: props.rom.hasheous_metadata?.mame_mess_match, + }, + { + name: "WHDLoad", + match: props.rom.hasheous_metadata?.whdload_match, + }, + { + name: "RetroAchievements", + match: props.rom.hasheous_metadata?.ra_match, + }, + ].filter((item) => item.match); +});