Fix bad logic on dialog
This commit is contained in:
parent
6da93efb10
commit
e92e6a8cac
1 changed files with 2 additions and 1 deletions
|
@ -343,7 +343,7 @@ if (!window.TE_ACTIVE) {
|
|||
buttons.style.marginTop = "1rem";
|
||||
dialog.appendChild(buttons);
|
||||
const submitButton = document.createElement("button");
|
||||
submitButton.innerText = localStorage["t00mp_username"] !== "" ? "Connect" : "Change Username";
|
||||
submitButton.innerText = (localStorage["t00mp_username"] && localStorage["t00mp_username"] === "") ? "Connect" : "Change Username";
|
||||
submitButton.onclick = () => submitFunction(null);
|
||||
buttons.appendChild(submitButton);
|
||||
if (localStorage["t00mp_username"] !== "") {
|
||||
|
@ -354,6 +354,7 @@ if (!window.TE_ACTIVE) {
|
|||
bg.remove();
|
||||
window.location.href = window.location.href;
|
||||
}
|
||||
buttons.appendChild(disconnectButton);
|
||||
}
|
||||
const doNotButton = document.createElement("button");
|
||||
doNotButton.innerText = "Close";
|
||||
|
|
Loading…
Reference in a new issue