Fix landing page, fix cancel button

This commit is contained in:
Pieter Vander Vennet 2020-07-29 21:48:41 +02:00
parent 033e97b873
commit e3309dce0c
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -35,7 +35,7 @@ export class SimpleAddUI extends UIElement {
= new UIEventSource<Preset>(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}),