Add Open Toilet Map, fix #34

This commit is contained in:
Pieter Vander Vennet 2020-08-22 16:00:33 +02:00
parent 2df565dc50
commit a55767c1e9
11 changed files with 188 additions and 188 deletions

View file

@ -7,6 +7,8 @@ import {LocalStorageSource} from "./Logic/Web/LocalStorageSource";
import {createHash} from "crypto";
import Combine from "./UI/Base/Combine";
import {Button} from "./UI/Base/Button";
import {FixedUiElement} from "./UI/Base/FixedUiElement";
import {State} from "./State";
const connection = new OsmConnection(true, new UIEventSource<string>(undefined), false);
connection.AttemptLogin();
@ -16,7 +18,7 @@ const localStorage = LocalStorageSource.Get("last-custom-save");
console.log("hash", hash)
console.log("Saved: ", localStorage.data)
if (hash === undefined || hash === "") {
if (hash === undefined || hash === "" && localStorage.data !== undefined) {
const previous = localStorage.data.split("#");
hash = previous[1];
console.log("Using previously saved data ", hash)
@ -41,4 +43,9 @@ new Combine([
themeGenerator.themeObject.data.maintainer = connection.userDetails.data.name;
themeGenerator.themeObject.data.layers = [];
themeGenerator.themeObject.ping();
})]).AttachTo("preview");
}),
"<br/>",
"Version: ",
State.vNumber
]).AttachTo("preview");