forked from MapComplete/MapComplete
Add retry button which clears local storage if something goes wrong
This commit is contained in:
parent
67c8311baa
commit
8f41e2d58c
1 changed files with 19 additions and 8 deletions
13
index.ts
13
index.ts
|
@ -87,7 +87,18 @@ if (layoutToUse?.id === "cyclofix") {
|
|||
|
||||
|
||||
const layoutFromBase64 = decodeURIComponent(userLayoutParam.data);
|
||||
document.getElementById('centermessage').innerText = '';
|
||||
document.getElementById('centermessage').innerText = 'Initilai';
|
||||
|
||||
new Combine(["Initializing... <br/>",
|
||||
new FixedUiElement("<a>If this message persist, something went wrong - click here to try again</a>")
|
||||
.SetClass("link-underline small")
|
||||
.onClick(() => {
|
||||
localStorage.clear();
|
||||
window.location.reload(true);
|
||||
|
||||
})])
|
||||
.AttachTo("centermessage"); // Add an initialization and reset button if something goes wrong
|
||||
|
||||
document.getElementById("decoration-desktop").remove();
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue