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:
@@ -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){
|
||||||
|
|||||||
Reference in New Issue
Block a user