From 01cfc5fe4db17362b3e3317f0eba7e0bf954a689 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 18 Oct 2024 00:27:39 +0200 Subject: [PATCH] Fix: special quicksearch for osmcha --- src/Logic/Search/SearchUtils.ts | 11 +++++++++++ src/UI/AllThemesGui.svelte | 2 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Logic/Search/SearchUtils.ts b/src/Logic/Search/SearchUtils.ts index 7b0f5a42e..9dca59512 100644 --- a/src/Logic/Search/SearchUtils.ts +++ b/src/Logic/Search/SearchUtils.ts @@ -16,21 +16,32 @@ export default class SearchUtils { } if (searchTerm === "personal") { window.location.href = ThemeSearch.createUrlFor({ id: "personal" }, undefined) + return true + } if (searchTerm === "bugs" || searchTerm === "issues") { window.location.href = "https://github.com/pietervdvn/MapComplete/issues" + return true + } if (searchTerm === "source") { window.location.href = "https://github.com/pietervdvn/MapComplete" + return true + } if (searchTerm === "docs") { window.location.href = "https://github.com/pietervdvn/MapComplete/tree/develop/Docs" + return true + } if (searchTerm === "osmcha" || searchTerm === "stats") { window.location.href = Utils.OsmChaLinkFor(7) + return true + } if (searchTerm === "studio") { window.location.href = "./studio.html" + return true } return false diff --git a/src/UI/AllThemesGui.svelte b/src/UI/AllThemesGui.svelte index 4a66b37c8..721265303 100644 --- a/src/UI/AllThemesGui.svelte +++ b/src/UI/AllThemesGui.svelte @@ -89,9 +89,7 @@ function applySearch() { const didRedirect = SearchUtils.applySpecialSearch(search.data) - console.log("Did redirect?", didRedirect) if (didRedirect) { - // Just for style and readability; won't _actually_ reach this return }