Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #100 from darwinia-network/darwinia-cc1
Browse files Browse the repository at this point in the history
Darwinia cc1 ui
  • Loading branch information
WoeOm authored Sep 19, 2020
2 parents a386a30 + b9a2f08 commit 590cd3a
Show file tree
Hide file tree
Showing 45 changed files with 296 additions and 395 deletions.
10 changes: 10 additions & 0 deletions packages/apps-config/src/module/darwinia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 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.

export default {
paths: {
transfer: true,
claims: true
}
};
13 changes: 13 additions & 0 deletions packages/apps-config/src/module/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// 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.

import { ExternalDef } from './types';

import darwinia from './darwinia';

const modulesDisabled: Record<string, ExternalDef> = {
Darwinia: darwinia
};

export default modulesDisabled;
9 changes: 9 additions & 0 deletions packages/apps-config/src/module/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// 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.

export type LinkTypes = 'transfer' | 'claims';

export interface ExternalDef {
paths: Partial<Record<LinkTypes, boolean>>;
}
12 changes: 6 additions & 6 deletions packages/apps-config/src/settings/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ function createDev (t: (key: string, text: string, options: { ns: string }) => s
function createLive (t: (key: string, text: string, options: { ns: string }) => string): Option[] {
return [
{
info: 'Crab Network',
info: 'crab',
text: t('rpc.crab.darwinia', 'Crab Network (hosted by Darwinia)', { ns: 'apps-config' }),
value: 'wss://crab.darwinia.network'
}
// {
// info: 'Darwinia Network',
// text: t('rpc.kusama.w3f', 'Darwinia Network (hosted by Darwinia)', { ns: 'apps-config' }),
// value: 'wss://crab.darwinia.network'
// }
];
}

function createTest (t: (key: string, text: string, options: { ns: string }) => string): Option[] {
return [
{
info: 'darwinia',
text: t('rpc.darwinia', 'Darwinia Network (hosted by Darwinia)', { ns: 'apps-config' }),
value: 'ws://146.56.203.90:9944'
}
];
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/apps-config/src/ui/logos/chains/crab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/apps-config/src/ui/logos/chains/darwinia.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added packages/apps-config/src/ui/logos/chains/dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/apps-config/src/ui/logos/chains/dev.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 12 additions & 27 deletions packages/apps-config/src/ui/logos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
// of the Apache-2.0 license. See the LICENSE file for details.

// anything for a specific chain, most would probably fit into the node category (but allow for chain-specific)
import chainKusama from './chains/kusama-128.gif';
import chainDarwinia from './chains/darwinia.svg';
import chainCrab from './chains/crab.svg';
import chainDev from './chains/dev.svg';

// defaults for the node type, assuming we don't have a specific chain, but rather match on the implementation
import nodeCentrifuge from './nodes/centrifuge.png';
import nodeEdgeware from './nodes/edgeware-circle.svg';
import nodeNodle from './nodes/nodle.svg';
import nodePolkadot from './nodes/polkadot-circle.svg';
import nodePolkadotJs from './nodes/polkadot-js.svg';
import nodeSubstrate from './nodes/substrate-hexagon.svg';
import nodeCrab from './nodes/darwinia-white-logo.svg';

// extensions
import extensionPolkadotJs from './extensions/polkadot-js.svg';
Expand All @@ -22,43 +18,32 @@ import emptyLogo from './empty.svg';

// overrides based on the actual matched chain name
const chainLogos: Record<string, any> = [
['Kusama', chainKusama], // new name after CC3
['Kusama CC1', chainKusama],
['Kusama CC2', chainKusama],
['Kusama CC3', chainKusama]
['darwinia cc1', chainDarwinia],
['darwinia', chainDarwinia],
['crab network', chainCrab],
['darwinia network', chainDarwinia]
].reduce((logos, [chain, logo]): Record<string, any> => ({
...logos,
[chain.toLowerCase()]: logo
}), {});

// overrides based on the actual software node type (all '-' converted to ' ')
const nodeLogos: Record<string, any> = [
['centrifuge chain', nodeCentrifuge],
['Edgeware Node', nodeEdgeware],
['kulupu', nodeSubstrate],
['node-template', nodeSubstrate],
['Nodle Chain Node', nodeNodle],
['parity-polkadot', nodePolkadot],
['polkadot-js', nodePolkadotJs],
['substrate-node', nodeSubstrate],
['crab', nodeCrab]
['crab', chainCrab],
['darwinia', chainDarwinia]
].reduce((logos, [node, logo]): Record<string, any> => ({
...logos,
[node.toLowerCase().replace(/-/g, ' ')]: logo
}), {});

// overrides when we pass an explicit logo name
const namedLogos: Record<string, any> = {
alexander: nodePolkadot,
centrifuge: nodeCentrifuge,
edgeware: nodeEdgeware,
empty: emptyLogo,
kusama: chainKusama,
nodle: nodeNodle,
polkadot: nodePolkadot,
empty: chainDev,
substrate: nodeSubstrate,
westend: nodePolkadot,
crab: nodeCrab
crab: chainCrab,
darwinia: chainDarwinia
};

// extension logos
Expand Down
Binary file not shown.

This file was deleted.

1 change: 0 additions & 1 deletion packages/apps-config/src/ui/logos/nodes/edgeware.svg

This file was deleted.

Loading

0 comments on commit 590cd3a

Please sign in to comment.