diff --git a/pages/game/[slug].vue b/pages/game/[slug].vue index 3741cd030d..6c2108fe58 100644 --- a/pages/game/[slug].vue +++ b/pages/game/[slug].vue @@ -518,8 +518,9 @@ export default { linear-gradient(90deg, black, #1c1c1c); /* Grey tones for background */ background-origin: border-box; background-clip: content-box, border-box; - box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.5), /* Subtle shadow for depth */ - inset 0 0 2px 0 rgba(255, 255, 255, 0.3); /* Inset effect */ + box-shadow: + 0 0 4px 0 rgba(0, 0, 0, 0.5), + /* Subtle shadow for depth */ inset 0 0 2px 0 rgba(255, 255, 255, 0.3); /* Inset effect */ color: white; /* White text for contrast */ text-shadow: 1px 1px 0 #000000; /* Retro pixelated text shadow */ } diff --git a/pages/search.vue b/pages/search.vue index 55969fdf09..81928efedb 100644 --- a/pages/search.vue +++ b/pages/search.vue @@ -92,7 +92,7 @@ export default { handlesearch: function () { let config = useRuntimeConfig().public; let baseurl = config.BASE_API_URL + "/api/search?"; - let params = { results: 1000 }; + let params = {}; let tags = []; if (this.selectedTags) { this.selectedTags.forEach((tagobj) => { @@ -112,22 +112,24 @@ export default { if (this.textQuery) { params["q"] = this.textQuery; } - let url = baseurl + new URLSearchParams(params); - console.log(url); + let url = baseurl + new URLSearchParams({ results: 1000, ...params }); + fetch(url).then((response) => { let gameblob = response.json().then((data) => { this.entries = data["entries"]; }); }); + + this.$router.push({ query: params }); }, setSearchParameters: function () { // Let's check if there are some query param we should honor - if (this.$route.query.title) { - this.textQuery = this.$route.query.title; + if (this.$route.query.q) { + this.textQuery = this.$route.query.q; } if (this.$route.query.platform) { if ( - ["gb", "gbc", "gba"].includes( + ["gb", "gbc", "gba", "nes"].includes( this.$route.query.platform.toLowerCase(), ) ) { @@ -166,6 +168,7 @@ export default { { name: "GB", code: "GB" }, { name: "GBC", code: "GBC" }, { name: "GBA", code: "GBA" }, + { name: "NES", code: "NES" }, ], selectedType: { name: "All", code: "all" }, types: [