SHA256
Обновить запуск UI и упростить регистрацию
This commit is contained in:
@@ -152,6 +152,7 @@ const routes = {
|
||||
const screenEl = document.getElementById('app-screen');
|
||||
const toolbarEl = document.getElementById('toolbar-slot');
|
||||
const appShellEl = document.querySelector('.app-shell');
|
||||
const initialSplashEl = document.getElementById('initial-splash');
|
||||
|
||||
const CONNECTION_CHECK_INTERVAL_MS = 20 * 1000;
|
||||
const SIGNED_DM_DECRYPT_CONTEXT_WAIT_MS = 2000;
|
||||
@@ -177,6 +178,7 @@ let uiVersionCheckInFlight = false;
|
||||
let uiVersionPeriodicIntervalId = null;
|
||||
let hiddenDmAudioContext = null;
|
||||
let hiddenDmAudioUnlocked = false;
|
||||
let initialConnectionCompleted = false;
|
||||
const CALL_PUSH_PENDING_ACTION_KEY = 'shine-ui-call-push-pending-action-v1';
|
||||
const GUEST_ALLOWED_PAGES = new Set([
|
||||
'start-view',
|
||||
@@ -331,6 +333,11 @@ function refreshConnectionUi() {
|
||||
const bannerEl = ensureConnectionRetryBannerEl();
|
||||
if (!bannerEl) return;
|
||||
|
||||
if (!initialConnectionCompleted) {
|
||||
bannerEl.hidden = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (state === 'connected' || state === 'updating') {
|
||||
bannerEl.hidden = true;
|
||||
stopConnectionCountdown();
|
||||
@@ -360,6 +367,21 @@ function refreshConnectionUi() {
|
||||
bannerEl.textContent = 'Проблема с соединением. Нажмите для повтора';
|
||||
}
|
||||
|
||||
function finishInitialConnectionSplash() {
|
||||
if (initialConnectionCompleted) return;
|
||||
initialConnectionCompleted = true;
|
||||
if (!initialSplashEl) {
|
||||
refreshConnectionUi();
|
||||
return;
|
||||
}
|
||||
|
||||
initialSplashEl.classList.add('is-leaving');
|
||||
const removeSplash = () => initialSplashEl.remove();
|
||||
initialSplashEl.addEventListener('transitionend', removeSplash, { once: true });
|
||||
window.setTimeout(removeSplash, 700);
|
||||
refreshConnectionUi();
|
||||
}
|
||||
|
||||
function startConnectionCountdown() {
|
||||
if (connectionStatusCountdownId) return;
|
||||
connectionStatusCountdownId = window.setInterval(() => {
|
||||
@@ -467,6 +489,9 @@ function setConnectionStatus(nextState, text = '') {
|
||||
if (!state) return;
|
||||
connectionState = state;
|
||||
connectionStatusText = String(text || '').trim();
|
||||
if (state === 'connected') {
|
||||
finishInitialConnectionSplash();
|
||||
}
|
||||
if (state === 'disconnected') {
|
||||
if (!connectionNextRetryAtMs || connectionNextRetryAtMs <= Date.now()) {
|
||||
connectionNextRetryAtMs = Date.now() + CONNECTION_CHECK_INTERVAL_MS;
|
||||
|
||||
Reference in New Issue
Block a user