Add retry button which clears local storage if something goes wrong

This commit is contained in:
Pieter Vander Vennet 2021-05-28 12:59:48 +02:00
parent 67c8311baa
commit 8f41e2d58c

View file

@ -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();