Alphabetical chain config names (#3601)
* Alphabetical chain config names * tick, trick, track... * Adjust
This commit is contained in:
parent
bbb9148760
commit
219098859a
@ -5,6 +5,7 @@
|
||||
import Beresheet from './beresheet';
|
||||
import Phala from './phala';
|
||||
|
||||
// alphabetical
|
||||
export default {
|
||||
Beresheet,
|
||||
'Phala PoC-2': Phala
|
||||
|
||||
@ -2,24 +2,29 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
// defaults
|
||||
const defaultColor = undefined; // '#f19135'
|
||||
const emptyColor = '#999';
|
||||
|
||||
// based on chain name
|
||||
// alphabetical
|
||||
const chainCrab = '#7C30DD';
|
||||
const chainCrust = '#ff8812';
|
||||
const chainKulupu = '#003366';
|
||||
const chainPhala = '#4dc56a';
|
||||
const chainPolkadot = '#e6007a';
|
||||
const chainKusama = '#000'; // '#d32e79';
|
||||
const chainRocco = '#6f36dc';
|
||||
const chainRoccoAcala = '#173DC9';
|
||||
const chainRoccoDarwinia = '#7C30DD';
|
||||
const chainRococoLaminar = '#004FFF';
|
||||
const chainRoccoTick = '#22bb22';
|
||||
const chainRoccoTrack = '#bb2222';
|
||||
const chainRoccoTrick = '#2222bb';
|
||||
const chainRoccoAcala = '#173DC9';
|
||||
const chainRoccoDarwinia = '#7C30DD';
|
||||
const laminarRoccoAcala = '#004FFF';
|
||||
const chainWestend = '#da68a7';
|
||||
const chainPhala = '#4dc56a';
|
||||
|
||||
// based on node name
|
||||
// alphabetical
|
||||
const nodeCentrifuge = '#fcc367';
|
||||
const nodeEdgeware = '#0a95df';
|
||||
const nodeNodle = '#1ab394';
|
||||
@ -27,31 +32,33 @@ const nodeKilt = '#eb5b2a';
|
||||
const nodeSubsocial = '#b9018c';
|
||||
|
||||
// overrides based on the actual matched chain name
|
||||
// alphabetical
|
||||
const chainColors: Record<string, any> = [
|
||||
['acala mandala pc1', chainRoccoAcala],
|
||||
['Crab', chainCrab],
|
||||
['crust maxwell cc2', chainCrust],
|
||||
['darwinia parachain', chainRoccoDarwinia],
|
||||
['Kulupu', chainKulupu],
|
||||
['Kusama', chainKusama],
|
||||
['Kusama CC1', chainKusama],
|
||||
['Kusama CC2', chainKusama],
|
||||
['Kusama CC3', chainKusama],
|
||||
['laminar turbulence pc1', chainRococoLaminar],
|
||||
['phala poc 2', chainPhala],
|
||||
['Polkadot', chainPolkadot],
|
||||
['Polkadot CC1', chainPolkadot],
|
||||
['Rococo', chainRocco],
|
||||
['Tick', chainRoccoTick],
|
||||
['Track', chainRoccoTrack],
|
||||
['Trick', chainRoccoTrick],
|
||||
['acala mandala pc1', chainRoccoAcala],
|
||||
['crust maxwell cc2', chainCrust],
|
||||
['darwinia parachain', chainRoccoDarwinia],
|
||||
['laminar turbulence pc1', laminarRoccoAcala],
|
||||
['Westend', chainWestend],
|
||||
['phala poc 2', chainPhala]
|
||||
['Westend', chainWestend]
|
||||
].reduce((colors, [chain, color]): Record<string, any> => ({
|
||||
...colors,
|
||||
[chain.toLowerCase()]: color
|
||||
}), {});
|
||||
|
||||
// overrides based on the actual software node type (all '-' converted to ' ')
|
||||
// alphabetical
|
||||
const nodeColors: Record<string, any> = [
|
||||
['centrifuge chain', nodeCentrifuge],
|
||||
['edgeware node', nodeEdgeware],
|
||||
|
||||
@ -2,17 +2,18 @@
|
||||
// This software may be modified and distributed under the terms
|
||||
// of the Apache-2.0 license. See the LICENSE file for details.
|
||||
|
||||
// overrides based on the actual software node type
|
||||
// overrides based on the actual software node type, valid values are one of -
|
||||
// polkadot, substrate, beachball
|
||||
const identityNodes: Record<string, string> = [
|
||||
['centrifuge chain', 'polkadot'],
|
||||
['edgeware-node', 'substrate'],
|
||||
['joystream-node', 'beachball'],
|
||||
['node-template', 'substrate'],
|
||||
['parity-polkadot', 'polkadot'],
|
||||
['phala-substrate-node', 'substrate'],
|
||||
['polkadot-js', 'polkadot'],
|
||||
['subsocial-node', 'substrate'],
|
||||
['substrate-node', 'substrate'],
|
||||
['phala-substrate-node', 'phala']
|
||||
['substrate-node', 'substrate']
|
||||
].reduce((icons, [spec, icon]): Record<string, string> => ({
|
||||
...icons,
|
||||
[spec.toLowerCase().replace(/-/g, ' ')]: icon
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
|
||||
// anything for a specific chain, most would probably fit into the node category (but allow for chain-specific)
|
||||
// alphbetical
|
||||
import chainDusty from './chains/dusty.png';
|
||||
import chainKusama from './chains/kusama-128.gif';
|
||||
import chainRococo from './chains/rococo.svg';
|
||||
@ -13,6 +14,7 @@ import chainRococoTrack from './chains/rococo-track.svg';
|
||||
import chainRococoTrick from './chains/rococo-trick.svg';
|
||||
|
||||
// defaults for the node type, assuming we don't have a specific chain, but rather match on the implementation
|
||||
// alphbetical
|
||||
import nodeAcala from './nodes/acala-circle.svg';
|
||||
import nodeCentrifuge from './nodes/centrifuge.png';
|
||||
import nodeCrab from './nodes/crab.svg';
|
||||
@ -23,19 +25,21 @@ import nodeEncointerNotee from './nodes/encointer-notee.svg';
|
||||
import nodeEncointerTeeproxy from './nodes/encointer-teeproxy.svg';
|
||||
import nodeNodle from './nodes/nodle.svg';
|
||||
import nodeKilt from './nodes/kilt.svg';
|
||||
import nodeKulupu from './nodes/kulupu.svg';
|
||||
import nodeLaminar from './nodes/laminar-circle.svg';
|
||||
import nodePhala from './nodes/phala.svg';
|
||||
import nodePlasm from './nodes/plasm.png';
|
||||
import nodePolkadot from './nodes/polkadot-circle.svg';
|
||||
import nodePolkadotJs from './nodes/polkadot-js.svg';
|
||||
import nodeSubsocial from './nodes/subsocial.svg';
|
||||
import nodeSubstrate from './nodes/substrate-hexagon.svg';
|
||||
import nodeKulupu from './nodes/kulupu.svg';
|
||||
import nodeLaminar from './nodes/laminar-circle.svg';
|
||||
import nodePhala from './nodes/phala.svg';
|
||||
|
||||
// extensions
|
||||
// alphbetical
|
||||
import extensionPolkadotJs from './extensions/polkadot-js.svg';
|
||||
|
||||
// external links
|
||||
// alphbetical
|
||||
import externalCommonwealth from './external/commonwealth.png';
|
||||
import externalPolkascan from './external/polkascan.png';
|
||||
import externalPolkassembly from './external/polkassembly.png';
|
||||
@ -46,6 +50,7 @@ import externalSubscan from './external/subscan.svg';
|
||||
import emptyLogo from './empty.svg';
|
||||
|
||||
// overrides based on the actual matched chain name
|
||||
// alphabetical
|
||||
const chainLogos: Record<string, any> = [
|
||||
['Dusty', chainDusty],
|
||||
['Kusama', chainKusama], // new name after CC3
|
||||
@ -62,6 +67,7 @@ const chainLogos: Record<string, any> = [
|
||||
}), {});
|
||||
|
||||
// overrides based on the actual software node type (all '-' converted to ' ')
|
||||
// alphabetical
|
||||
const nodeLogos: Record<string, any> = [
|
||||
['centrifuge chain', nodeCentrifuge],
|
||||
['Centrifuge Chain Node', nodeCentrifuge],
|
||||
@ -78,16 +84,17 @@ const nodeLogos: Record<string, any> = [
|
||||
['Nodle Chain Node', nodeNodle],
|
||||
['parity-polkadot', nodePolkadot],
|
||||
['Plasm Node', nodePlasm],
|
||||
['phala-substrate-node', nodePhala],
|
||||
['polkadot-js', nodePolkadotJs],
|
||||
['subsocial-node', nodeSubsocial],
|
||||
['substrate-node', nodeSubstrate],
|
||||
['phala-substrate-node', nodePhala]
|
||||
['substrate-node', nodeSubstrate]
|
||||
].reduce((logos, [node, logo]): Record<string, any> => ({
|
||||
...logos,
|
||||
[(node as string).toLowerCase().replace(/-/g, ' ')]: logo
|
||||
}), {});
|
||||
|
||||
// overrides when we pass an explicit logo name
|
||||
// alphabetical
|
||||
const namedLogos: Record<string, any> = {
|
||||
acala: nodeAcala,
|
||||
alexander: nodePolkadot,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user