SHA256
Скрыть тестовые версии связей по умолчанию
This commit is contained in:
@@ -3,6 +3,7 @@ import * as modernNetworkView from './network-view.js';
|
||||
import * as legacyNetworkView from './network-legacy/network-view.js';
|
||||
import * as explorerNetworkView from './network-explorer/network-view.js';
|
||||
import * as explorerCanvasView from './network-canvas-v4/network-view.js';
|
||||
import { isDeveloperToolsEnabled } from '../services/feature-settings.js';
|
||||
|
||||
const NETWORK_VERSION_STORAGE_KEY = 'shine.network.version';
|
||||
const MODES = new Set(['legacy', 'modern', 'explorer', 'explorer-canvas']);
|
||||
@@ -14,6 +15,7 @@ window.addEventListener('shine:network-tab-enter', explorerNetworkView.resetExpl
|
||||
export const pageMeta = modernNetworkView.pageMeta;
|
||||
|
||||
function selectedMode() {
|
||||
if (!isDeveloperToolsEnabled()) return DEFAULT_MODE;
|
||||
try {
|
||||
const saved = window.localStorage.getItem(NETWORK_VERSION_STORAGE_KEY);
|
||||
return MODES.has(saved) ? saved : DEFAULT_MODE;
|
||||
@@ -64,7 +66,7 @@ export function render(context = {}) {
|
||||
if (!topbarLeft || topbarLeft.querySelector('.network-version-switcher')) return;
|
||||
topbarLeft.append(createModeSwitcher(mode, context.navigate));
|
||||
};
|
||||
attachSwitcher();
|
||||
if (isDeveloperToolsEnabled()) attachSwitcher();
|
||||
|
||||
const topbarSlot = document.getElementById('topbar-slot');
|
||||
const observer = typeof MutationObserver === 'function' && topbarSlot
|
||||
|
||||
Reference in New Issue
Block a user