Вынести дефолтный сервер в конфиг UI и оживить счетчик пароля

This commit is contained in:
AidarKC
2026-06-23 14:11:09 +04:00
parent 95daa230bb
commit 66986b804c
13 changed files with 50 additions and 18 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
import { captureClientError } from './client-error-reporter.js';
import { defaultServerWs } from '../deploy-config.js';
const DEFAULT_TIMEOUT_MS = 12000;
function buildWsUrl(raw) {
const value = (raw || '').trim();
if (!value) return 'wss://shineup.me/ws';
if (!value) return defaultServerWs;
if (value.startsWith('/')) {
const secure = window.location.protocol === 'https:';
const scheme = secure ? 'wss' : 'ws';