Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@
"success": "You're on the list! We'll notify you first.",
"alreadyRegistered": "You're already on the waitlist.",
"error": "Registration failed. Please try again.",
"errorRateLimit": "Too many attempts. Please try again in an hour.",
"errorServiceUnavailable": "Registration service is temporarily unavailable.",
"errorNetwork": "Network error. Check your connection and try again.",
"invalidEmail": "Please enter a valid email address."
},
"byokTitle": "Or bring your own keys",
Expand Down
8 changes: 7 additions & 1 deletion src/settings-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,18 @@ function initOverviewListeners(area: HTMLElement): void {
? t('modals.settingsWindow.worldMonitor.register.alreadyRegistered')
: t('modals.settingsWindow.worldMonitor.register.success');
regStatus.className = 'wm-reg-status ok';
} else if (res.status === 429) {
regStatus.textContent = t('modals.settingsWindow.worldMonitor.register.errorRateLimit');
regStatus.className = 'wm-reg-status error';
} else if (res.status === 503) {
regStatus.textContent = t('modals.settingsWindow.worldMonitor.register.errorServiceUnavailable');
regStatus.className = 'wm-reg-status error';
} else {
regStatus.textContent = data.error || t('modals.settingsWindow.worldMonitor.register.error');
regStatus.className = 'wm-reg-status error';
}
} catch {
regStatus.textContent = t('modals.settingsWindow.worldMonitor.register.error');
regStatus.textContent = t('modals.settingsWindow.worldMonitor.register.errorNetwork');
regStatus.className = 'wm-reg-status error';
} finally {
btn.disabled = false;
Expand Down