From 88cbe96fa1118f026818cd42f00518042e9b05a5 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 23 Apr 2025 00:02:52 +0200 Subject: [PATCH] improve error message when registration failed --- static/webui/script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/webui/script.js b/static/webui/script.js index e4d0ed92..e8dce874 100644 --- a/static/webui/script.js +++ b/static/webui/script.js @@ -13,6 +13,7 @@ function doLogin() { } function loginFromLocalStorage() { + const isRegister = registerSubmit; doLoginRequest( data => { if (single.getCurrentPath() == "/webui/") { @@ -28,7 +29,7 @@ function loginFromLocalStorage() { }, () => { logout(); - alert("Login failed"); + alert(isRegister ? "Registration failed. Account already exists?" : "Login failed"); } ); }