Fix: special quicksearch for osmcha

This commit is contained in:
Pieter Vander Vennet 2024-10-18 00:27:39 +02:00
parent 4d2b3c9cf7
commit 01cfc5fe4d
2 changed files with 11 additions and 2 deletions

View file

@ -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

View file

@ -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
}