feat: validate WebSocket URL on login screen

Show inline hint when the gateway URL doesn't start with ws:// or wss://
and disable the connect button until it's valid. Prevents confusing
connection errors from malformed URLs.
This commit is contained in:
Nicolas Varrot
2026-02-12 06:55:19 +00:00
parent cb882f5ead
commit dc49734819
2 changed files with 14 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ const en = {
'login.showToken': 'Show token',
'login.hideToken': 'Hide token',
'login.storedLocally': 'Credentials are stored locally in your browser',
'login.wsHint': 'URL must start with ws:// or wss://',
// Header
'header.title': 'PinchChat',
@@ -97,6 +98,7 @@ const fr: Record<keyof typeof en, string> = {
'login.showToken': 'Afficher le token',
'login.hideToken': 'Masquer le token',
'login.storedLocally': 'Les identifiants sont stockés localement dans votre navigateur',
'login.wsHint': 'L\'URL doit commencer par ws:// ou wss://',
'header.title': 'PinchChat',
'header.connected': 'Connecté',