Add layer-control-toggle to the URL bar and in the share-screen, fix #90

This commit is contained in:
Pieter Vander Vennet 2020-08-22 13:02:31 +02:00
parent 734f571b5d
commit 0e4cd630e6
4 changed files with 32 additions and 5 deletions

View file

@ -441,10 +441,14 @@ export class ThemeGenerator extends UIElement {
private readonly allQuestionFields: UIElement[];
public url: UIEventSource<string>;
private loginButton: Button
constructor(connection: OsmConnection, windowHash) {
super(connection.userDetails);
this.userDetails = connection.userDetails;
this.loginButton = new Button("Log in with OSM", () => {
connection.AttemptLogin()
})
const defaultTheme = {layers: [], icon: "./assets/bug.svg"};
let loadedTheme = undefined;
@ -573,7 +577,7 @@ export class ThemeGenerator extends UIElement {
InnerRender(): string {
if (!this.userDetails.data.loggedIn) {
return "Not logged in. You need to be logged in to create a theme."
return new Combine(["Not logged in. You need to be logged in to create a theme.", this.loginButton]).Render();
}
if (this.userDetails.data.csCount < 500) {
return "You need at least 500 changesets to create your own theme.";