From 3508776583c21785dffc2f0bc9e7dd81c3f08480 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Fri, 20 Mar 2026 23:16:01 -0700 Subject: init custom changes --- res/setup.html | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'res/setup.html') diff --git a/res/setup.html b/res/setup.html index 8068a9d..546ee1b 100644 --- a/res/setup.html +++ b/res/setup.html @@ -19,17 +19,16 @@
-

SyncTube

-

Create your admin account

+ Welcome to Dohee Cinema +

Welcome to the Dohee Cinema

+

put in the password for entry

-
- + -
- +
@@ -40,30 +39,24 @@ formElement.addEventListener("submit", function (e) { e.preventDefault(); - const { name, password, confirmation } = formElement.elements; + const { password } = formElement.elements; const payload = { - name: name.value, password: password.value, - passwordConfirmation: confirmation.value, - } + }; - fetch("/setup", { method: "POST", body: JSON.stringify(payload) }) + fetch("/gate", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload) }) .then(res => res.json()) .then(response => handleResponse(response)) .catch(() => handleResponse(null)); }, true); - function handleResponse(response) { - if (response.success) { - return window.location.reload(); + if (response && response.success === true) { + window.location.href = "/"; + return; } - const errors = !response - ? ["Unknown error"] - : (response.errors ?? []).map(item => item.error); - - showErrors(errorsElement, errors); + showErrors(errorsElement, ["Incorrect password. Not cool man"]); } function showErrors(container, errors) { -- cgit v1.2.3