diff --git a/frontend/src/components/Gallery/AppBar/Search/Base.vue b/frontend/src/components/Gallery/AppBar/Search/Base.vue new file mode 100644 index 000000000..aa7a27f49 --- /dev/null +++ b/frontend/src/components/Gallery/AppBar/Search/Base.vue @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/components/Gallery/AppBar/Search/PlatformSelector.vue b/frontend/src/components/Gallery/AppBar/Search/PlatformSelector.vue new file mode 100644 index 000000000..c3a2ecaec --- /dev/null +++ b/frontend/src/components/Gallery/AppBar/Search/PlatformSelector.vue @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/components/Gallery/AppBar/Search/SearchBtn.vue b/frontend/src/components/Gallery/AppBar/Search/SearchBtn.vue new file mode 100644 index 000000000..4fbb31201 --- /dev/null +++ b/frontend/src/components/Gallery/AppBar/Search/SearchBtn.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/frontend/src/components/Gallery/AppBar/Search/SearchTextField.vue b/frontend/src/components/Gallery/AppBar/Search/SearchTextField.vue new file mode 100644 index 000000000..35c7cf6f9 --- /dev/null +++ b/frontend/src/components/Gallery/AppBar/Search/SearchTextField.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/frontend/src/components/Gallery/AppBar/common/FilterDrawer/Base.vue b/frontend/src/components/Gallery/AppBar/common/FilterDrawer/Base.vue index 9b6a7e43c..be0775ea5 100644 --- a/frontend/src/components/Gallery/AppBar/common/FilterDrawer/Base.vue +++ b/frontend/src/components/Gallery/AppBar/common/FilterDrawer/Base.vue @@ -4,17 +4,21 @@ import FilterMatchedBtn from "@/components/Gallery/AppBar/common/FilterDrawer/Fi import FilterFavouritesBtn from "@/components/Gallery/AppBar/common/FilterDrawer/FilterFavouritesBtn.vue"; import FilterDuplicatesBtn from "@/components/Gallery/AppBar/common/FilterDrawer/FilterDuplicatesBtn.vue"; import FilterTextField from "@/components/Gallery/AppBar/common/FilterTextField.vue"; +import PlatformSelector from "@/components/Gallery/AppBar/Search/PlatformSelector.vue"; +import SearchTextField from "@/components/Gallery/AppBar/Search/SearchTextField.vue"; +import SearchBtn from "@/components/Gallery/AppBar/Search/SearchBtn.vue"; import storeGalleryFilter from "@/stores/galleryFilter"; import type { Events } from "@/types/emitter"; import type { Emitter } from "mitt"; import { storeToRefs } from "pinia"; -import { inject, nextTick } from "vue"; +import { inject, nextTick, ref } from "vue"; import { useDisplay } from "vuetify"; import { useI18n } from "vue-i18n"; // Props const { t } = useI18n(); const { xs } = useDisplay(); +const viewportWidth = ref(window.innerWidth); const emitter = inject>("emitter"); const galleryFilterStore = storeGalleryFilter(); const { @@ -83,15 +87,34 @@ function resetFilters() { - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/components/Gallery/AppBar/common/FilterTextField.vue b/frontend/src/components/Gallery/AppBar/common/FilterTextField.vue index e1933eb29..96e079a8e 100644 --- a/frontend/src/components/Gallery/AppBar/common/FilterTextField.vue +++ b/frontend/src/components/Gallery/AppBar/common/FilterTextField.vue @@ -11,20 +11,20 @@ import { useI18n } from "vue-i18n"; const { t } = useI18n(); const emitter = inject>("emitter"); const galleryFilterStore = storeGalleryFilter(); -const { filterSearch } = storeToRefs(galleryFilterStore); +const { filterText } = storeToRefs(galleryFilterStore); const filterRoms = debounce(() => { emitter?.emit("filter", null); }, 500); function clear() { - filterSearch.value = ""; + filterText.value = ""; } +import { useI18n } from "vue-i18n"; + +const { t } = useI18n(); + + + + + + mdi-magnify + + + + {{ t("emptyStates.search-for-games") }} + + + + diff --git a/frontend/src/components/common/Navigation/ScanBtn.vue b/frontend/src/components/common/Navigation/ScanBtn.vue index 8079bb9a5..d398289c5 100644 --- a/frontend/src/components/common/Navigation/ScanBtn.vue +++ b/frontend/src/components/common/Navigation/ScanBtn.vue @@ -23,7 +23,7 @@ withDefaults( const navigationStore = storeNavigation(); const auth = storeAuth(); const galleryFilter = storeGalleryFilter(); -const isFiltered = normalizeString(galleryFilter.filterSearch).trim() != ""; +const isFiltered = normalizeString(galleryFilter.filterText).trim() != ""; const emitter = inject>("emitter"); const scanningStore = storeScanning(); const { scanningPlatforms, scanning } = storeToRefs(scanningStore); diff --git a/frontend/src/components/common/Navigation/SearchBtn.vue b/frontend/src/components/common/Navigation/SearchBtn.vue index d29ebc339..361f0f374 100644 --- a/frontend/src/components/common/Navigation/SearchBtn.vue +++ b/frontend/src/components/common/Navigation/SearchBtn.vue @@ -6,10 +6,9 @@ import { inject } from "vue"; const emitter = inject>("emitter"); - + mdi-magnify diff --git a/frontend/src/components/common/RDialog.vue b/frontend/src/components/common/RDialog.vue index 960d4ed1a..d1ff7eb40 100644 --- a/frontend/src/components/common/RDialog.vue +++ b/frontend/src/components/common/RDialog.vue @@ -1,7 +1,7 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/views/GameDetails.vue b/frontend/src/views/GameDetails.vue index e612e9d81..04da549b4 100644 --- a/frontend/src/views/GameDetails.vue +++ b/frontend/src/views/GameDetails.vue @@ -9,7 +9,7 @@ import RelatedGames from "@/components/Details/RelatedGames.vue"; import Saves from "@/components/Details/Saves.vue"; import States from "@/components/Details/States.vue"; import TitleInfo from "@/components/Details/Title.vue"; -import EmptyGame from "@/components/common/EmptyGame.vue"; +import EmptyGame from "@/components/common/EmptyStates/EmptyGame.vue"; import GameCard from "@/components/common/Game/Card/Base.vue"; import romApi from "@/services/api/rom"; import storeDownload from "@/stores/download";