From 04cf4a77d0ebf1f3a2a925bc2eace4a911a54e74 Mon Sep 17 00:00:00 2001 From: KingKDot Date: Sun, 17 May 2026 15:01:34 -0500 Subject: [PATCH] add view explaining raw mode. --- Overlord-Server/public/assets/build.js | 30 ++++++++ Overlord-Server/public/build.html | 101 ++++++++++++++++++++++++- 2 files changed, 127 insertions(+), 4 deletions(-) diff --git a/Overlord-Server/public/assets/build.js b/Overlord-Server/public/assets/build.js index 6539695..fa4b5c0 100644 --- a/Overlord-Server/public/assets/build.js +++ b/Overlord-Server/public/assets/build.js @@ -614,6 +614,36 @@ if (rawServerListCheckbox && serverUrlInput) { }); } +const rawServerListHelpBtn = document.getElementById("raw-server-list-help"); +const rawServerListModal = document.getElementById("raw-server-list-modal"); +const rawServerListModalClose = document.getElementById("raw-server-list-modal-close"); +const rawServerListModalOk = document.getElementById("raw-server-list-modal-ok"); + +function showRawServerListModal() { + if (!rawServerListModal) return; + rawServerListModal.classList.remove("hidden"); + rawServerListModal.classList.add("flex"); +} +function hideRawServerListModal() { + if (!rawServerListModal) return; + rawServerListModal.classList.remove("flex"); + rawServerListModal.classList.add("hidden"); +} + +if (rawServerListHelpBtn) rawServerListHelpBtn.addEventListener("click", showRawServerListModal); +if (rawServerListModalClose) rawServerListModalClose.addEventListener("click", hideRawServerListModal); +if (rawServerListModalOk) rawServerListModalOk.addEventListener("click", hideRawServerListModal); +if (rawServerListModal) { + rawServerListModal.addEventListener("click", (e) => { + if (e.target === rawServerListModal) hideRawServerListModal(); + }); +} +document.addEventListener("keydown", (e) => { + if (e.key === "Escape" && rawServerListModal && !rawServerListModal.classList.contains("hidden")) { + hideRawServerListModal(); + } +}); + if (solMemoCheckbox && solSettings) { solMemoCheckbox.addEventListener("change", () => { const isSol = solMemoCheckbox.checked; diff --git a/Overlord-Server/public/build.html b/Overlord-Server/public/build.html index 9af6548..49c0a78 100644 --- a/Overlord-Server/public/build.html +++ b/Overlord-Server/public/build.html @@ -192,10 +192,16 @@

Just enter your domain or IP — no wss://, https://, or any other prefix.

- +
+ + +
@@ -800,6 +806,93 @@ + + +