Skip to content

Commit

Permalink
Fix: special quicksearch for osmcha
Browse files Browse the repository at this point in the history
  • Loading branch information
pietervdvn committed Oct 17, 2024
1 parent 4d2b3c9 commit 01cfc5f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/Logic/Search/SearchUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/UI/AllThemesGui.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 01cfc5f

Please sign in to comment.