feat: Redirect to /menu if admin is already logged in on login page

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2026-05-19 19:07:37 +00:00
parent 2f18b1ba6b
commit e8011e3f68

View File

@@ -46,6 +46,13 @@
</div> </div>
<script src="/static/header.js"></script> <script src="/static/header.js"></script>
<script> <script>
(async function() {
try {
const r = await fetch('/api/albums');
if (r.ok) location.href = '/menu';
} catch (e) {}
})();
const form = document.getElementById('loginForm'); const form = document.getElementById('loginForm');
const msg = document.getElementById('msg'); const msg = document.getElementById('msg');
function show(kind, text){ function show(kind, text){