From bca5f8f240270aa9b96429b052539a59e71aeaa2 Mon Sep 17 00:00:00 2001 From: jocayn <1579649885@qq.com> Date: Sat, 13 Jun 2026 17:33:37 +0800 Subject: [PATCH] fix(viewer): fix login view visibility and transition behavior --- public/viewer.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/public/viewer.html b/public/viewer.html index 4fe9c87..f99be1d 100644 --- a/public/viewer.html +++ b/public/viewer.html @@ -21,6 +21,10 @@ box-sizing: border-box; } + [hidden] { + display: none !important; + } + body { margin: 0; min-height: 100vh; @@ -425,7 +429,14 @@ if (!res.ok) { throw new Error(data.error || '密码不正确'); } - window.location.href = data.redirectTo || '/sub'; + const targetPath = data.redirectTo || '/sub'; + if (targetPath === '/sub' || targetPath === '/sub/' || targetPath === window.location.pathname) { + input.value = ''; + showHistory(); + await loadHistory(); + } else { + window.location.href = targetPath; + } } catch (e) { error.textContent = e.message; } finally {