Fix: services pagination. Fix: login/signup auto-redirect to homepage if already logged in

This commit is contained in:
hyzen
2026-06-09 12:02:55 +05:30
parent 4094266e78
commit 9fdcfdd885
8 changed files with 25 additions and 42 deletions

View File

@@ -183,9 +183,6 @@
'auth-message auth-message--success';
document.getElementById('auth-message').style.display = 'block';
document.getElementById('signup-form').style.display = 'none';
setTimeout(function () {
window.location.href = '/';
}, 1500);
return;
}
@@ -195,7 +192,6 @@
sessionStorage.getItem('f4_login_next') ||
'';
// Save referrer as next-page if not already set and referrer is on this site
if (!_signupNext && document.referrer) {
try {
var _refUrl = new URL(document.referrer);
@@ -394,11 +390,11 @@
if (data.success) {
showMsg('Account created! Redirecting to login\u2026', 'success');
setTimeout(function () {
window.location.href =
_signupNext && _signupNext.startsWith('/')
? '/login/?next=' + encodeURIComponent(_signupNext)
: '/login/';
window.location.href = '/login/';
var _loginUrl = '/login/';
if (_signupNext && _signupNext.startsWith('/')) {
_loginUrl = '/login/?next=' + encodeURIComponent(_signupNext);
}
window.location.href = _loginUrl;
}, 1800);
} else {
showMsg(data.message || 'Sign-up failed. Please try again.', 'error');