Fixes to import flow

This commit is contained in:
Pieter Vander Vennet 2022-04-19 23:42:58 +02:00
parent 2c1144cf10
commit bce8ae3e34
4 changed files with 32 additions and 16 deletions

View file

@ -13,19 +13,20 @@ export class ConfirmProcess extends Combine implements FlowStep<{ features: any[
constructor(v: { features: any[], theme: string }) {
const t = Translations.t.importHelper.confirmProcess;
const toConfirm = [
const elements = [
new Link(t.readImportGuidelines, "https://wiki.openstreetmap.org/wiki/Import_guidelines", true),
t.contactedCommunity,
t.licenseIsCompatible,
t.wikipageIsMade
];
]
const toConfirm = new CheckBoxes(elements);
super([
new Title(t.titleLong),
new CheckBoxes(toConfirm),
toConfirm,
]);
this.SetClass("link-underline")
this.IsValid = new CheckBoxes(toConfirm).GetValue().map(selected => toConfirm.length == selected.length)
this.IsValid = toConfirm.GetValue().map(selected => elements.length == selected.length)
this.Value = new UIEventSource<{ features: any[], theme: string }>(v)
}
}