diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-07-03 21:23:32 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-07-03 21:23:32 -0700 |
| commit | 361e4d860fcca66dad0dd99b965b297d92ac748c (patch) | |
| tree | 62052c68828b8a7f1376c60c9eee95d28cfba094 | |
| parent | 04eb44d685ba677a444b73c7cfc2427d2740497f (diff) | |
add UI elements for going to admin registration page
Signed-off-by: Pinapelz <yukais@pinapelz.com>
| -rw-r--r-- | res/admin-register.html | 9 | ||||
| -rw-r--r-- | res/index.html | 1 | ||||
| -rw-r--r-- | res/langs/en.json | 3 | ||||
| -rw-r--r-- | src/client/Buttons.hx | 4 |
4 files changed, 14 insertions, 3 deletions
diff --git a/res/admin-register.html b/res/admin-register.html index 1a75c48..ebde94c 100644 --- a/res/admin-register.html +++ b/res/admin-register.html @@ -67,6 +67,15 @@ const successEl = document.createElement("div"); successEl.innerText = "Admin account created! You can now log in."; successEl.style.color = "green"; + const homeLink = document.createElement("a"); + homeLink.innerText = "Go back"; + homeLink.href = "/"; + homeLink.style.display = "inline-block"; + homeLink.style.marginTop = "8px"; + homeLink.style.color = "blue"; + homeLink.style.textDecoration = "underline"; + successEl.appendChild(document.createElement("br")); + successEl.appendChild(homeLink); errorsElement.appendChild(successEl); Array.from(formElement.elements).forEach(el => { el.disabled = true; }); diff --git a/res/index.html b/res/index.html index 76fa65c..02ef525 100644 --- a/res/index.html +++ b/res/index.html @@ -199,6 +199,7 @@ <li><button id="setVideoUrlBtn"><span>${setVideoUrl}</span></button></li> <li><button id="selectLocalVideoBtn"><span>${selectLocalVideo}</span></button></li> <li><button id="removePlayerBtn"><span>${removePlayer}</span></button></li> + <li><a href="/admin-register"><button><span>${registerAdmin}</span></button></a></li> </div> <div id="adminMenu" style="display: none;"> <h4>${chat}</h4> diff --git a/res/langs/en.json b/res/langs/en.json index 02f91ea..acdcf86 100644 --- a/res/langs/en.json +++ b/res/langs/en.json @@ -115,5 +115,6 @@ "areYouSure": "Are you sure?", "dataWillBeLost": "The data will be lost.", - "setupTitle": "Welcome to Dohee Cinema!" + "setupTitle": "Welcome to Dohee Cinema!", + "registerAdmin": "Register as Admin" } diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx index f3a2474..82054ab 100644 --- a/src/client/Buttons.hx +++ b/src/client/Buttons.hx @@ -234,8 +234,8 @@ class Buttons { checkboxCache.checked = settings.checkedCache.contains(playerType); final panel = getEl("#addfromurl"); - final oldH = panel.style.height; // save for animation - panel.style.height = ""; // to calculate height from content + final oldH = panel.style.height; + panel.style.height = ""; final newH = Utils.outerHeight(panel) + "px"; panel.style.height = oldH; Timer.delay(() -> panel.style.height = newH, 0); |
