diff --git a/assets/layers/unit/unit.json b/assets/layers/unit/unit.json index df67d4d42..5c23af3a0 100644 --- a/assets/layers/unit/unit.json +++ b/assets/layers/unit/unit.json @@ -1,7 +1,7 @@ { "id": "unit", "description": { - "en": "Library layer with all common units" + "en": "Library layer with all common units. Units can _only_ be imported from this file." }, "source": "special:library", "units": [ diff --git a/assets/themes/buurtnatuur/buurtnatuur.json b/assets/themes/buurtnatuur/buurtnatuur.json index d1aeb67d4..841f84390 100644 --- a/assets/themes/buurtnatuur/buurtnatuur.json +++ b/assets/themes/buurtnatuur/buurtnatuur.json @@ -4,7 +4,7 @@ "nl": "Breng jouw buurtnatuur in kaart" }, "description": { - "nl": "logo-groenmeld je aan voor e-mailupdates." + "nl": "
Natuur maakt gelukkig. Aan de hand van deze website willen we de natuur dicht bij ons beter inventariseren. Met als doel meer mensen te laten genieten van toegankelijke natuur én te strijden voor meer natuur in onze buurten.

Samen kleuren we heel Vlaanderen en Brussel groen.Blijf op de hoogte van de resultaten van buurtnatuur.be: meld je aan voor e-mailupdates." }, "shortDescription": { "nl": "Met deze tool kan je natuur in je buurt in kaart brengen en meer informatie geven over je favoriete plekje" diff --git a/langs/en.json b/langs/en.json index 88316ed2b..3bbf5de03 100644 --- a/langs/en.json +++ b/langs/en.json @@ -182,7 +182,8 @@ "backgroundSwitch": "Switch background", "cancel": "Cancel", "confirm": "Confirm", - "customThemeIntro": "

Custom themes

These are previously visited user-generated themes.", + "customThemeIntro": "These are previously visited user-generated themes.", + "customThemeTitle": "Custom themes", "download": { "downloadAsPdf": "Download a PDF of the current map", "downloadAsPdfHelper": "Ideal to print the current map", diff --git a/langs/layers/en.json b/langs/layers/en.json index f999ac63d..5b3b1584a 100644 --- a/langs/layers/en.json +++ b/langs/layers/en.json @@ -10346,4 +10346,4 @@ "render": "wind turbine" } } -} +} \ No newline at end of file diff --git a/public/css/index-tailwind-output.css b/public/css/index-tailwind-output.css index b1ce0d698..4c85fba79b 100644 --- a/public/css/index-tailwind-output.css +++ b/public/css/index-tailwind-output.css @@ -876,16 +876,16 @@ video { margin-bottom: 1rem; } -.mx-1 { - margin-left: 0.25rem; - margin-right: 0.25rem; -} - .my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; } +.mx-1 { + margin-left: 0.25rem; + margin-right: 0.25rem; +} + .mx-10 { margin-left: 2.5rem; margin-right: 2.5rem; @@ -1262,10 +1262,6 @@ video { width: 16rem; } -.w-1\/2 { - width: 50%; -} - .w-14 { width: 3.5rem; } @@ -1533,6 +1529,10 @@ video { justify-self: end; } +.justify-self-center { + justify-self: center; +} + .overflow-auto { overflow: auto; } @@ -2892,6 +2892,10 @@ a.link-underline { width: 6rem; } + .sm\:w-1\/2 { + width: 50%; + } + .sm\:flex-nowrap { flex-wrap: nowrap; } diff --git a/src/UI/AllThemesGui.svelte b/src/UI/AllThemesGui.svelte index 9948b09a7..47e2b3609 100644 --- a/src/UI/AllThemesGui.svelte +++ b/src/UI/AllThemesGui.svelte @@ -7,12 +7,18 @@ import Translations from "./i18n/Translations" import Logo from "../assets/svg/Logo.svelte" import Tr from "./Base/Tr.svelte" - import ToSvelte from "./Base/ToSvelte.svelte" import MoreScreen from "./BigComponents/MoreScreen" import LoginToggle from "./Base/LoginToggle.svelte" import Pencil from "../assets/svg/Pencil.svelte" import Login from "../assets/svg/Login.svelte" import Constants from "../Models/Constants" + import { Store, UIEventSource } from "../Logic/UIEventSource" + import { placeholder } from "../Utils/placeholder" + import { SearchIcon } from "@rgossiaux/svelte-heroicons/solid" + import ThemesList from "./BigComponents/ThemesList.svelte" + import { LayoutInformation } from "../Models/ThemeConfig/LayoutConfig" + import * as themeOverview from "../assets/generated/theme_overview.json" + import UnofficialThemeList from "./BigComponents/UnofficialThemeList.svelte" const featureSwitches = new OsmConnectionFeatureSwitches() const osmConnection = new OsmConnection({ @@ -20,17 +26,45 @@ oauth_token: QueryParameters.GetQueryParameter( "oauth_token", undefined, - "Used to complete the login" + "Used to complete the login", ), }) const state = new UserRelatedState(osmConnection) const t = Translations.t.index + const tr = Translations.t.general.morescreen + let userLanguages = osmConnection.userDetails.map((ud) => ud.languages) + let themeSearchText: UIEventSource = new UIEventSource(undefined) + + document.addEventListener("keydown", function(event) { + if (event.ctrlKey && event.code === "KeyF") { + document.getElementById("theme-search")?.focus() + event.preventDefault() + } + }) + + let visitedHiddenThemes: Store + const hiddenThemes: LayoutInformation[] = + (themeOverview["default"] ?? themeOverview)?.filter((layout) => layout.hideFromOverview) ?? [] + { + const prefix = "mapcomplete-hidden-theme-" + const userPreferences = state.osmConnection.preferencesHandler.preferences + visitedHiddenThemes = userPreferences.map(preferences => { + const knownIds = new Set( + Object.keys(preferences) + .filter((key) => key.startsWith(prefix)) + .map((key) => key.substring(prefix.length, key.length - "-enabled".length)), + ) + return hiddenThemes.filter((theme) => knownIds.has(theme.id)) + }) + } + +
- +
@@ -48,9 +82,42 @@
- + +
MoreScreen.applySearch(themeSearchText.data)}> + +
+ + + + +

+ +

+

+ +

+
+
+ + +