SHA256
Разделить среды и закрепить лицензии в HEADER 1.0
This commit is contained in:
+5
-7
@@ -64,7 +64,6 @@ import {
|
||||
setContacts,
|
||||
} from './state.js';
|
||||
|
||||
import { setSolanaCluster } from './services/solana-rpc-gateway.js';
|
||||
|
||||
import * as startView from './pages/start-view.js?v=20261104';
|
||||
import * as entrySettingsView from './pages/entry-settings-view.js?v=202609260900';
|
||||
@@ -730,7 +729,7 @@ async function notifyHiddenIncomingMessage(fromLogin, toLogin, unreadCount, mess
|
||||
}
|
||||
|
||||
function ensureConnectionIndicatorEl() {
|
||||
return document.getElementById('toolbar-connection-indicator');
|
||||
return document.getElementById('toolbar-test-indicator');
|
||||
}
|
||||
|
||||
function ensureConnectionRetryBannerEl() {
|
||||
@@ -765,8 +764,7 @@ function refreshConnectionUi() {
|
||||
|
||||
const indicatorEl = ensureConnectionIndicatorEl();
|
||||
if (indicatorEl) {
|
||||
indicatorEl.classList.remove('is-connected', 'is-disconnected', 'is-connecting', 'is-updating', 'is-unknown');
|
||||
indicatorEl.classList.add(`is-${state || 'unknown'}`);
|
||||
indicatorEl.hidden = authService.serverEnvironment?.testMode !== true;
|
||||
}
|
||||
|
||||
const bannerEl = ensureConnectionRetryBannerEl();
|
||||
@@ -1134,6 +1132,7 @@ async function checkConnectionHealth() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (authService.environmentGeneration !== authService.ws.connectionGeneration || !authService.serverEnvironment) await authService.getServerEnvironment();
|
||||
const pingResp = await authService.ws.request('Ping', { ts: Date.now() }, 7000);
|
||||
const remoteUiBuildHash = pingResp?.payload?.uiBuildHash || pingResp?.uiBuildHash || '';
|
||||
void checkAndReloadIfUiUpdated(remoteUiBuildHash);
|
||||
@@ -2090,8 +2089,7 @@ async function init() {
|
||||
// Public server info: one UI build for both devnet and mainnet.
|
||||
try {
|
||||
await authService.reconnect(state.entrySettings.shineServer);
|
||||
const info = await authService.ws.request('GetServerInfo', {}, 9000);
|
||||
setSolanaCluster(info?.payload?.solanaCluster ?? info?.solanaCluster);
|
||||
await authService.getServerEnvironment();
|
||||
} catch (error) {
|
||||
console.warn('Failed to read SHiNE Solana cluster', error);
|
||||
}
|
||||
@@ -2142,7 +2140,7 @@ const SESSION_HANDSHAKE_OPS = new Set([
|
||||
]);
|
||||
|
||||
authService.ws.setRequestGuard(async (op) => {
|
||||
if (op === 'ClientErrorLog' || SESSION_HANDSHAKE_OPS.has(op)) return;
|
||||
if (op === 'ClientErrorLog' || op === 'GetServerInfo' || SESSION_HANDSHAKE_OPS.has(op)) return;
|
||||
if (!state.session.isAuthorized || authService.ws.isSessionReady()) return;
|
||||
await ensureSessionAfterWsReconnect();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user