feat(ui): error & state UX — error surface, view states, map selection, sheet gestures (F4)
- lib/error/: classify any caught error into a stable ErrorKind from the transport signal (HTTP status / Connect Code / fetch TypeError / navigator.onLine); map to translated error.* messages via reportError (sticky Retry toast for retryable kinds) or errorMessageKey (inline). Mail compose now surfaces the translated 403/error inline. - lib/ui/view-state.svelte: shared loading/empty/error placeholder with the right live-region role + optional action; entity tables (races/sciences/ship-classes) migrated, rest adopt incrementally. - map/selection-ring.ts: accent ring around the selected planet, fed into the map buildExtras alongside the reach circles. - lib/ui/sheet-dismiss.ts: tap-outside + drag-handle swipe-down dismissal for the planet/ship-group bottom-sheets (hand-rolled pointer events). Tests: error, view-state, selection-ring, sheet-dismiss (761 total). Docs: ui/docs/error-state-ux.md (+ index); F4 marked done. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,10 +9,23 @@ const en = {
|
||||
"common.loading": "loading…",
|
||||
"common.dismiss": "dismiss",
|
||||
"common.skip_to_content": "skip to main content",
|
||||
"common.retry": "retry",
|
||||
"common.browser_not_supported_title": "browser not supported",
|
||||
"common.browser_not_supported_body":
|
||||
"Galaxy requires Ed25519 in WebCrypto. See supported browsers.",
|
||||
|
||||
"error.offline":
|
||||
"You appear to be offline. Check your connection and try again.",
|
||||
"error.network": "Couldn't reach the server. Please try again.",
|
||||
"error.auth": "Your session has expired. Please sign in again.",
|
||||
"error.forbidden": "You don't have permission to do that.",
|
||||
"error.conflict":
|
||||
"This changed since you loaded it. Refresh and try again.",
|
||||
"error.not_found": "Not found — it may have been removed.",
|
||||
"error.rate_limit": "Too many requests. Wait a moment and try again.",
|
||||
"error.server": "The server ran into a problem. Please try again.",
|
||||
"error.unknown": "Something went wrong.",
|
||||
|
||||
"game.events.turn_ready.message": "turn {turn} is ready",
|
||||
"game.events.turn_ready.action": "view now",
|
||||
"game.events.signature_failed": "verification failed, reconnecting…",
|
||||
|
||||
Reference in New Issue
Block a user