From e3309dce0cfa85f3a244e45e29d851145b33f4f2 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 29 Jul 2020 21:48:41 +0200 Subject: [PATCH] Fix landing page, fix cancel button --- Logic/OsmConnection.ts | 2 +- UI/SimpleAddUI.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Logic/OsmConnection.ts b/Logic/OsmConnection.ts index 920770b..62a7a4e 100644 --- a/Logic/OsmConnection.ts +++ b/Logic/OsmConnection.ts @@ -28,7 +28,7 @@ export class OsmConnection { oauth_secret: 'wDBRTCem0vxD7txrg1y6p5r8nvmz8tAhET7zDASI', oauth_token: oauth_token.data, singlepage: true, - landing: "./index.html", + landing: window.location.href, auto: true // show a login form if the user is not authenticated and // you try to do a call diff --git a/UI/SimpleAddUI.ts b/UI/SimpleAddUI.ts index 61ede4e..13af8c8 100644 --- a/UI/SimpleAddUI.ts +++ b/UI/SimpleAddUI.ts @@ -35,7 +35,7 @@ export class SimpleAddUI extends UIElement { = new UIEventSource(undefined); private confirmButton: UIElement = undefined; private cancelButton: UIElement; - private goToInboxButton: UIElement = new SubtleButton("/assets/envelope.svg", + private goToInboxButton: UIElement = new SubtleButton("./assets/envelope.svg", Translations.t.general.goToInbox, {url:"https://www.openstreetmap.org/messages/inbox", newTab: false}); constructor(zoomlevel: UIEventSource<{ zoom: number }>, @@ -89,7 +89,7 @@ export class SimpleAddUI extends UIElement { } this.cancelButton = new SubtleButton( - "/assets/close.svg", + "./assets/close.svg", Translations.t.general.cancel ).onClick(() => { self._confirmPreset.setData(undefined); @@ -112,6 +112,10 @@ export class SimpleAddUI extends UIElement { if (this._confirmPreset.data !== undefined) { + if(this._userDetails.data.dryRun){ + this.CreatePoint(this._confirmPreset.data)(); + return; + } return new Combine([ Translations.t.general.add.confirmIntro.Subs({title: this._confirmPreset.data.name}),