From 10cc41fa01781f4351b84f73cc613a44357dd7f6 Mon Sep 17 00:00:00 2001 From: Zurdi Date: Thu, 11 Apr 2024 23:59:35 +0200 Subject: [PATCH] show source filters only of enabled --- frontend/src/App.vue | 10 +++++----- .../Dialog/Rom/MatchRom/MatchRom.vue | 4 ++++ .../Dialog/Rom/MatchRom/SelectSource.vue | 18 +++++++++++++----- .../src/components/Dialog/Rom/UploadRom.vue | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 721130646..0241405af 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -22,7 +22,7 @@ const isFiltered = normalizeString(galleryFilter.filterSearch).trim() != ""; const emitter = inject>("emitter"); // Props -const heartbeatStore = storeHeartbeat(); +const heartbeat = storeHeartbeat(); const configStore = storeConfig(); socket.on( @@ -96,11 +96,11 @@ onBeforeUnmount(() => { }); onBeforeMount(() => { - api.get("/heartbeat").then(({ data: heartBeatData }) => { - heartbeatStore.set(heartBeatData); + api.get("/heartbeat").then(({ data: data }) => { + heartbeat.set(data); }); - api.get("/config").then(({ data: configData }) => { - configStore.set(configData); + api.get("/config").then(({ data: data }) => { + configStore.set(data); }); }); diff --git a/frontend/src/components/Dialog/Rom/MatchRom/MatchRom.vue b/frontend/src/components/Dialog/Rom/MatchRom/MatchRom.vue index e20ce9fc1..6bf51de43 100644 --- a/frontend/src/components/Dialog/Rom/MatchRom/MatchRom.vue +++ b/frontend/src/components/Dialog/Rom/MatchRom/MatchRom.vue @@ -2,6 +2,7 @@ import type { SearchRomSchema } from "@/__generated__"; import SelectSourceDialog from "@/components/Dialog/Rom/MatchRom/SelectSource.vue"; import romApi from "@/services/api/rom"; +import storeHeartbeat from "@/stores/heartbeat"; import storeRoms, { type Rom } from "@/stores/roms"; import type { Events } from "@/types/emitter"; import type { Emitter } from "mitt"; @@ -21,6 +22,7 @@ const matchedRoms = ref([]); const filteredMatchedRoms = ref(); const theme = useTheme(); const emitter = inject>("emitter"); +const heartbeat = storeHeartbeat(); const isIGDBFiltered = ref(true); const isMobyFiltered = ref(true); emitter?.on("showMatchRomDialog", (romToSearch) => { @@ -184,6 +186,7 @@ onBeforeUnmount(() => { open-delay="500" >