v1.2.15 - Admin verification: show 'Waiting for response' with status updates, 60s timeout, no premature access denied
This commit is contained in:
+11
-3
@@ -536,7 +536,15 @@ async function verifyAdminAccess() {
|
||||
console.log('Continuing to wait for admin response despite publish error...');
|
||||
}
|
||||
|
||||
// Set timeout for admin verification (30 seconds — relay may be under heavy load)
|
||||
// Update status message after 5 seconds to indicate relay is under load
|
||||
setTimeout(() => {
|
||||
const statusEl = document.getElementById('admin-verify-status');
|
||||
if (statusEl && pendingAdminVerification) {
|
||||
statusEl.textContent = 'Relay is under heavy load — still waiting for response...';
|
||||
}
|
||||
}, 5000);
|
||||
|
||||
// Final timeout: 60 seconds — if no response by then, deny access
|
||||
adminVerificationTimeout = setTimeout(() => {
|
||||
if (pendingAdminVerification) {
|
||||
console.log('⛔ Admin verification timeout - user is not admin');
|
||||
@@ -545,7 +553,7 @@ async function verifyAdminAccess() {
|
||||
hideAdminVerificationLoading();
|
||||
showAccessDeniedOverlay();
|
||||
}
|
||||
}, 30000);
|
||||
}, 60000);
|
||||
}
|
||||
|
||||
// Show loading indicator while verifying admin access
|
||||
@@ -560,7 +568,7 @@ function showAdminVerificationLoading() {
|
||||
<div class="admin-verification-content">
|
||||
<div class="spinner"></div>
|
||||
<h3>Verifying Administrator Access...</h3>
|
||||
<p>Please wait while we verify your admin privileges.</p>
|
||||
<p id="admin-verify-status">Waiting for response from relay...</p>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(loadingOverlay);
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@
|
||||
// Using CRELAY_ prefix to avoid conflicts with nostr_core_lib VERSION macros
|
||||
#define CRELAY_VERSION_MAJOR 1
|
||||
#define CRELAY_VERSION_MINOR 2
|
||||
#define CRELAY_VERSION_PATCH 14
|
||||
#define CRELAY_VERSION "v1.2.14"
|
||||
#define CRELAY_VERSION_PATCH 15
|
||||
#define CRELAY_VERSION "v1.2.15"
|
||||
|
||||
// Relay metadata (authoritative source for NIP-11 information)
|
||||
#define RELAY_NAME "C-Relay"
|
||||
|
||||
Reference in New Issue
Block a user