forked from polkadot-js/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
72 lines (66 loc) · 2.18 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Copyright 2017-2020 @polkadot/apps-config authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
const defaultColor = undefined; // '#f19135'
const emptyColor = '#999';
const chainCrab = '#7C30DD';
const chainKulupu = '#003366';
const chainPolkadot = '#e6007a';
const chainKusama = '#000'; // '#d32e79';
const chainRocco = '#6f36dc';
const chainRoccoTick = '#22bb22';
const chainRoccoTrack = '#bb2222';
const chainRoccoTrick = '#2222bb';
const chainRoccoAcala = '#173DC9';
const chainRoccoDarwinia = '#7C30DD';
const laminarRoccoAcala = '#004FFF';
const chainWestend = '#da68a7';
const chainPhala = '#4dc56a';
const nodeCentrifuge = '#fcc367';
const nodeEdgeware = '#0a95df';
const nodeNodle = '#1ab394';
const nodeKilt = '#eb5b2a';
const nodeSubsocial = '#b9018c';
// overrides based on the actual matched chain name
const chainColors: Record<string, any> = [
['Crab', chainCrab],
['Kulupu', chainKulupu],
['Kusama', chainKusama],
['Kusama CC1', chainKusama],
['Kusama CC2', chainKusama],
['Kusama CC3', chainKusama],
['Polkadot', chainPolkadot],
['Polkadot CC1', chainPolkadot],
['Rococo', chainRocco],
['Tick', chainRoccoTick],
['Track', chainRoccoTrack],
['Trick', chainRoccoTrick],
['acala mandala pc1', chainRoccoAcala],
['darwinia parachain', chainRoccoDarwinia],
['laminar turbulence pc1', laminarRoccoAcala],
['Westend', chainWestend],
['phala poc 2', chainPhala]
].reduce((colors, [chain, color]): Record<string, any> => ({
...colors,
[chain.toLowerCase()]: color
}), {});
// overrides based on the actual software node type (all '-' converted to ' ')
const nodeColors: Record<string, any> = [
['centrifuge chain', nodeCentrifuge],
['edgeware node', nodeEdgeware],
['kilt node', nodeKilt],
['nodle chain node', nodeNodle],
['subsocial node', nodeSubsocial]
// ['node template', emptyColor],
// ['parity polkadot', emptyColor],
// ['substrate node', emptyColor]
].reduce((colors, [node, color]): Record<string, any> => ({
...colors,
[node.toLowerCase().replace(/-/g, ' ')]: color
}), {});
export {
defaultColor,
chainColors,
emptyColor,
nodeColors
};