forked from MapComplete/MapComplete
First version of giving feedback to contriubtors on invalid values
This commit is contained in:
parent
e07b770e8c
commit
5221e91dcd
16 changed files with 586 additions and 436 deletions
|
@ -29,17 +29,17 @@ export class AskMetadata extends Combine implements FlowStep<{
|
|||
|
||||
constructor(params: ({ features: any[], layer: LayerConfig })) {
|
||||
|
||||
const introduction = ValidatedTextField.InputForType("text", {
|
||||
const introduction = ValidatedTextField.ForType("text").ConstructInputElement({
|
||||
value: LocalStorageSource.Get("import-helper-introduction-text"),
|
||||
inputStyle: "width: 100%"
|
||||
})
|
||||
|
||||
const wikilink = ValidatedTextField.InputForType("string", {
|
||||
const wikilink = ValidatedTextField.ForType("string").ConstructInputElement({
|
||||
value: LocalStorageSource.Get("import-helper-wikilink-text"),
|
||||
inputStyle: "width: 100%"
|
||||
})
|
||||
|
||||
const source = ValidatedTextField.InputForType("string", {
|
||||
const source = ValidatedTextField.ForType("string").ConstructInputElement({
|
||||
value: LocalStorageSource.Get("import-helper-source-text"),
|
||||
inputStyle: "width: 100%"
|
||||
})
|
||||
|
@ -59,7 +59,7 @@ export class AskMetadata extends Combine implements FlowStep<{
|
|||
|
||||
const theme = new DropDown("Which theme should be linked in the note?", options)
|
||||
|
||||
ValidatedTextField.InputForType("string", {
|
||||
ValidatedTextField.ForType("string").ConstructInputElement({
|
||||
value: LocalStorageSource.Get("import-helper-theme-text"),
|
||||
inputStyle: "width: 100%"
|
||||
})
|
||||
|
|
|
@ -92,7 +92,7 @@ export default class ConflationChecker extends Combine implements FlowStep<{ fea
|
|||
const background = new UIEventSource<BaseLayer>(AvailableBaseLayers.osmCarto)
|
||||
const location = new UIEventSource<Loc>({lat: 0, lon: 0, zoom: 1})
|
||||
const currentBounds = new UIEventSource<BBox>(undefined)
|
||||
const zoomLevel = ValidatedTextField.InputForType("pnat")
|
||||
const zoomLevel = ValidatedTextField.ForType("pnat").ConstructInputElement()
|
||||
zoomLevel.SetClass("ml-1 border border-black")
|
||||
zoomLevel.GetValue().syncWith(LocalStorageSource.Get("importer-zoom-level", "14"), true)
|
||||
const osmLiveData = Minimap.createMiniMap({
|
||||
|
@ -146,7 +146,7 @@ export default class ConflationChecker extends Combine implements FlowStep<{ fea
|
|||
features: new StaticFeatureSource(toImport.features, false)
|
||||
})
|
||||
|
||||
const nearbyCutoff = ValidatedTextField.InputForType("pnat")
|
||||
const nearbyCutoff = ValidatedTextField.ForType("pnat").ConstructInputElement()
|
||||
nearbyCutoff.SetClass("ml-1 border border-black")
|
||||
nearbyCutoff.GetValue().syncWith(LocalStorageSource.Get("importer-cutoff", "25"), true)
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ interface NoteState {
|
|||
|
||||
class MassAction extends Combine {
|
||||
constructor(state: UserRelatedState, props: NoteProperties[]) {
|
||||
const textField = ValidatedTextField.InputForType("text")
|
||||
const textField = ValidatedTextField.ForType("text").ConstructInputElement()
|
||||
|
||||
const actions = new DropDown<{
|
||||
predicate: (p: NoteProperties) => boolean,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue