forked from MapComplete/MapComplete
Port bird-hides to new JSON-format, various improvements
This commit is contained in:
parent
00a6611e1f
commit
9e4035befc
22 changed files with 460 additions and 378 deletions
|
@ -22,7 +22,7 @@ export default class CustomGeneratorPanel extends UIElement {
|
|||
private mainPanel: UIElement;
|
||||
private loginButton: UIElement;
|
||||
|
||||
private connection: OsmConnection;
|
||||
private readonly connection: OsmConnection;
|
||||
|
||||
constructor(connection: OsmConnection, layout: LayoutConfigJson) {
|
||||
super(connection.userDetails);
|
||||
|
@ -40,7 +40,7 @@ export default class CustomGeneratorPanel extends UIElement {
|
|||
private InitMainPanel(layout: LayoutConfigJson, userDetails: UserDetails, connection: OsmConnection) {
|
||||
const es = new UIEventSource(layout);
|
||||
const encoded = es.map(config => btoa(JSON.stringify(config)));
|
||||
encoded.addCallback(encoded => LocalStorageSource.Get("\"last-custom-theme\""))
|
||||
encoded.addCallback(encoded => LocalStorageSource.Get("last-custom-theme"))
|
||||
const liveUrl = encoded.map(encoded => `./index.html?userlayout=${es.data.id}#${encoded}`)
|
||||
const iframe = liveUrl.map(url => `<iframe src='${url}' width='100%' height='99%' style="box-sizing: border-box" title='Theme Preview'></iframe>`);
|
||||
const currentSetting = new UIEventSource<SingleSetting<any>>(undefined)
|
||||
|
|
|
@ -11,7 +11,7 @@ export class GenerateEmpty {
|
|||
overpassTags: {and: [""]},
|
||||
title: undefined,
|
||||
description: {},
|
||||
tagRenderings: []
|
||||
tagRenderings: [],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ export default class TagRenderingPanel extends InputElement<TagRenderingConfigJs
|
|||
this.options = options ?? {};
|
||||
const questionsNotUnlocked = userDetails.csCount < State.userJourney.themeGeneratorFullUnlock;
|
||||
this.options.disableQuestions =
|
||||
(this.options.disableQuestions ?? false) &&
|
||||
(this.options.disableQuestions ?? false) ||
|
||||
questionsNotUnlocked;
|
||||
|
||||
this.intro = new Combine(["<h3>", options?.title ?? "TagRendering", "</h3>", options?.description ?? ""])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue