Split menu (#5660)

This commit is contained in:
Jaco 2021-06-22 18:16:21 +03:00 committed by GitHub
parent 9c4bc85e4e
commit 8dd5ccdd23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 16 deletions

View File

@ -6,9 +6,9 @@ import type { LinkOption } from './types';
import { createCustom, createDev, createOwn } from './development';
import { createProduction } from './production';
import { createProductionRelays } from './productionRelays';
import { createKusamaRelay, createPolkadotRelay } from './productionRelays';
import { createTesting } from './testing';
import { createRococoRelays, createWestendRelays } from './testingRelays';
import { createRococoRelay, createWestendRelay } from './testingRelays';
export { CUSTOM_ENDPOINT_KEY } from './development';
@ -19,33 +19,41 @@ export function createWsEndpoints (t: TFunction, firstOnly?: boolean): LinkOptio
isDisabled: false,
isHeader: true,
isSpaced: true,
text: t('rpc.header.live.relay', 'Live relays & parachains', { ns: 'apps-config' }),
text: t('rpc.header.polkadot.relay', 'Polkadot & parachains', { ns: 'apps-config' }),
textBy: '',
value: ''
},
...createProductionRelays(t, firstOnly),
...createPolkadotRelay(t, firstOnly),
{
isDisabled: false,
isHeader: true,
text: t('rpc.header.test.relay', 'Test relays & parachains', { ns: 'apps-config' }),
text: t('rpc.header.kusama.relay', 'Kusama & parachains', { ns: 'apps-config' }),
textBy: '',
value: ''
},
...createRococoRelays(t, firstOnly),
...createKusamaRelay(t, firstOnly),
{
isDisabled: false,
isHeader: true,
isSpaced: true,
text: t('rpc.header.rococo.relay', 'Rococo test & parachains', { ns: 'apps-config' }),
text: t('rpc.header.westend.relay', 'Test Westend & parachains', { ns: 'apps-config' }),
textBy: '',
value: ''
},
...createWestendRelays(t, firstOnly),
...createWestendRelay(t, firstOnly),
{
isDisabled: false,
isHeader: true,
text: t('rpc.header.rococo.relay', 'Test Rococo & parachains', { ns: 'apps-config' }),
textBy: '',
value: ''
},
...createRococoRelay(t, firstOnly),
{
isDisabled: false,
isHeader: true,
isSpaced: true,
text: t('rpc.header.westend.relay', 'Westend test & parachains', { ns: 'apps-config' }),
text: t('rpc.header.live', 'Live networks', { ns: 'apps-config' }),
textBy: '',
value: ''
},

View File

@ -8,9 +8,10 @@ import { createKusama } from './productionRelayKusama';
import { createPolkadot } from './productionRelayPolkadot';
import { expandEndpoints } from './util';
export function createProductionRelays (t: TFunction, firstOnly?: boolean): LinkOption[] {
return expandEndpoints(t, [
createPolkadot(t),
createKusama(t)
], firstOnly);
export function createKusamaRelay (t: TFunction, firstOnly?: boolean): LinkOption[] {
return expandEndpoints(t, [createKusama(t)], firstOnly);
}
export function createPolkadotRelay (t: TFunction, firstOnly?: boolean): LinkOption[] {
return expandEndpoints(t, [createPolkadot(t)], firstOnly);
}

View File

@ -8,10 +8,10 @@ import { createRococo } from './testingRelayRococo';
import { createWestend } from './testingRelayWestend';
import { expandEndpoints } from './util';
export function createRococoRelays (t: TFunction, firstOnly?: boolean): LinkOption[] {
export function createRococoRelay (t: TFunction, firstOnly?: boolean): LinkOption[] {
return expandEndpoints(t, [createRococo(t)], firstOnly);
}
export function createWestendRelays (t: TFunction, firstOnly?: boolean): LinkOption[] {
export function createWestendRelay (t: TFunction, firstOnly?: boolean): LinkOption[] {
return expandEndpoints(t, [createWestend(t)], firstOnly);
}