Merge branch 'develop' into feature/velopark

This commit is contained in:
Pieter Vander Vennet 2024-01-19 00:34:58 +01:00
commit 59e76b9c6f
30 changed files with 963 additions and 654 deletions

View file

@ -24,11 +24,12 @@ import Table from "../../UI/Base/Table"
import FilterConfigJson from "./Json/FilterConfigJson"
import { Overpass } from "../../Logic/Osm/Overpass"
import { FixedUiElement } from "../../UI/Base/FixedUiElement"
import Svg from "../../Svg"
import { ImmutableStore } from "../../Logic/UIEventSource"
import { OsmTags } from "../OsmFeature"
import Constants from "../Constants"
import { QuestionableTagRenderingConfigJson } from "./Json/QuestionableTagRenderingConfigJson"
import SvelteUIElement from "../../UI/Base/SvelteUIElement"
import Statistics from "../../assets/svg/Statistics.svelte"
export default class LayerConfig extends WithContextLoader {
public static readonly syncSelectionAllowed = ["no", "local", "theme-only", "global"] as const
@ -466,7 +467,7 @@ export default class LayerConfig extends WithContextLoader {
new Link(
Utils.runningFromConsole
? "<img src='https://mapcomplete.org/assets/svg/statistics.svg' height='18px'>"
: Svg.statistics_svg().SetClass("w-4 h-4 mr-2"),
: new SvelteUIElement(Statistics, {class: "w-4 h-4 mr-2"}),
"https://taginfo.openstreetmap.org/keys/" + values.key + "#values",
true
),

View file

@ -496,7 +496,8 @@ export default class TagRenderingConfig {
for (const leftover of leftovers) {
applicableMappings.push({
then: new TypedTranslation<object>(
this.render.replace("{" + this.freeform.key + "}", leftover).translations
this.render.replace("{" + this.freeform.key + "}", leftover).translations,
this.render.context
),
})
}

View file

@ -62,6 +62,7 @@ import FavouritesFeatureSource from "../Logic/FeatureSource/Sources/FavouritesFe
import { ProvidedImage } from "../Logic/ImageProviders/ImageProvider"
import { GeolocationControlState } from "../UI/BigComponents/GeolocationControl"
import Zoomcontrol from "../UI/Zoomcontrol"
import Locale from "../UI/i18n/Locale"
/**
*
@ -654,6 +655,16 @@ export default class ThemeViewState implements SpecialVisualizationState {
)
return true
})
Hotkeys.RegisterHotkey(
{
shift: "T",
},
Translations.t.hotkeyDocumentation.translationMode,
() => {
Locale.showLinkToWeblate.setData(!Locale.showLinkToWeblate.data)
}
)
}
/**