feat: Display login success messages, adjust user registration defaults and post-registration redirect, and include scripts for generating dummy items and copying thumbnails.
This commit is contained in:
@@ -69,6 +69,31 @@ window.requestAnimFrame = (function () {
|
||||
loginModal.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
// Handle Flash Message (login=success)
|
||||
if (window.location.search.includes('login=success')) {
|
||||
loginModal.style.display = 'flex';
|
||||
const form = loginModal.querySelector('.login-form');
|
||||
if (form && !form.querySelector('.flash-success')) {
|
||||
const msg = document.createElement('div');
|
||||
msg.className = 'flash-success';
|
||||
msg.style.color = '#fff';
|
||||
msg.style.background = 'var(--accent)'; // f0ck accent usually
|
||||
msg.style.padding = '10px';
|
||||
msg.style.borderRadius = '4px';
|
||||
msg.style.marginBottom = '10px';
|
||||
msg.style.textAlign = 'center';
|
||||
msg.style.color = 'black'; // contrast
|
||||
msg.style.fontWeight = 'bold';
|
||||
msg.textContent = 'Success! You might login now.';
|
||||
form.insertBefore(msg, form.firstChild); // Insert at top of form
|
||||
|
||||
// Clean URL
|
||||
const url = new URL(window.location);
|
||||
url.searchParams.delete('login');
|
||||
window.history.replaceState({}, '', url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Register Modal Logic
|
||||
|
||||
Reference in New Issue
Block a user