ghost-portal/packages/apps-config/src/ui/general/index.ts
Jaco Greeff 3bb0561a72
Remove "pre" in polkascan URLs (#2831)
* Remove "pre" in polkascan URLs

* Update with new link locations

* Kusama -> #000
2020-05-27 12:07:07 +02:00

51 lines
1.5 KiB
TypeScript

// 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 chainKulupu = '#003366';
const chainPolkadot = '#e6007a';
const chainKusama = '#000'; // '#d32e79';
const chainWestend = '#da68a7';
const nodeCentrifuge = '#fcc367';
const nodeEdgeware = '#0a95df';
const nodeNodle = '#1ab394';
// overrides based on the actual matched chain name
const chainColors: Record<string, any> = [
['Kulupu', chainKulupu],
['Kusama', chainKusama],
['Kusama CC1', chainKusama],
['Kusama CC2', chainKusama],
['Kusama CC3', chainKusama],
['Polkadot', chainPolkadot],
['Polkadot CC1', chainPolkadot],
['Westend', chainWestend]
].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],
['nodle chain node', nodeNodle]
// ['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
};