forked from MapComplete/MapComplete
Finish importer, add applicable import layers to every theme by default
This commit is contained in:
parent
3402ac0954
commit
ca1490902c
41 changed files with 1559 additions and 898 deletions
|
@ -43,6 +43,7 @@ export default class SimpleAddUI extends Toggle {
|
|||
constructor(isShown: UIEventSource<boolean>,
|
||||
filterViewIsOpened: UIEventSource<boolean>,
|
||||
state: {
|
||||
featureSwitchIsTesting: UIEventSource<boolean>,
|
||||
layoutToUse: LayoutConfig,
|
||||
osmConnection: OsmConnection,
|
||||
changes: Changes,
|
||||
|
@ -155,6 +156,7 @@ export default class SimpleAddUI extends Toggle {
|
|||
|
||||
private static CreateAllPresetsPanel(selectedPreset: UIEventSource<PresetInfo>,
|
||||
state: {
|
||||
featureSwitchIsTesting: UIEventSource<boolean>;
|
||||
filteredLayers: UIEventSource<FilteredLayer[]>,
|
||||
featureSwitchFilter: UIEventSource<boolean>,
|
||||
osmConnection: OsmConnection
|
||||
|
@ -162,10 +164,9 @@ export default class SimpleAddUI extends Toggle {
|
|||
const presetButtons = SimpleAddUI.CreatePresetButtons(state, selectedPreset)
|
||||
let intro: BaseUIElement = Translations.t.general.add.intro;
|
||||
|
||||
let testMode: BaseUIElement = undefined;
|
||||
if (state.osmConnection?.userDetails?.data?.dryRun) {
|
||||
testMode = Translations.t.general.testing.Clone().SetClass("alert")
|
||||
}
|
||||
let testMode: BaseUIElement = new Toggle(Translations.t.general.testing.SetClass("alert"),
|
||||
undefined,
|
||||
state.featureSwitchIsTesting);
|
||||
|
||||
return new Combine([intro, testMode, presetButtons]).SetClass("flex flex-col")
|
||||
|
||||
|
|
|
@ -73,10 +73,11 @@ export default class UserBadge extends Toggle {
|
|||
).SetClass("alert")
|
||||
}
|
||||
|
||||
let dryrun = new FixedUiElement("");
|
||||
if (user.dryRun) {
|
||||
dryrun = new FixedUiElement("TESTING").SetClass("alert font-xs p-0 max-h-4");
|
||||
}
|
||||
let dryrun = new Toggle(
|
||||
new FixedUiElement("TESTING").SetClass("alert font-xs p-0 max-h-4"),
|
||||
undefined,
|
||||
state.featureSwitchIsTesting
|
||||
)
|
||||
|
||||
const settings =
|
||||
new Link(Svg.gear,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue