Add support for Sub.ID as an external link on accounts page (#6135)

* Update @subsocial/types

* Add suport for subId externl link on accounts page

* Revert "Change order"

This reverts commit 2af96cc1153c07085ddc4b7d0cac94b2bf813b5a.
This commit is contained in:
Oleh Mell 2021-09-16 17:34:55 +03:00 committed by GitHub
parent ab17348eac
commit c90f35f65a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 0 deletions

View File

@ -10,6 +10,7 @@ import Polkascan from './polkascan';
import { PolkassemblyIo, PolkassemblyNetwork } from './polkassembly';
import Polkastats from './polkastats';
import Statescan from './statescan';
import SubId from './subid';
import Subscan from './subscan';
export const externalLinks: Record<string, ExternalDef> = {
@ -21,5 +22,6 @@ export const externalLinks: Record<string, ExternalDef> = {
PolkassemblyNetwork,
Polkastats,
Statescan,
SubId,
Subscan
};

View File

@ -0,0 +1,32 @@
// Copyright 2017-2021 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type BN from 'bn.js';
import { externalLogos } from '../ui/logos';
export default {
chains: {
Altair: 'altair',
Bifrost: 'bifrost',
'Centrifuge Mainnet': 'centrifuge',
ChainX: 'chainx',
Edgeware: 'edgeware',
Karura: 'karura',
Khala: 'khala',
Kusama: 'kusama',
Polkadot: 'polkadot',
SORA: 'sora-substrate',
Shiden: 'shiden',
Statemine: 'statemine',
Subsocial: 'subsocial'
},
create: (_chain: string, _path: string, data: BN | number | string): string =>
`https://sub.id/#/${data.toString()}`,
isActive: true,
logo: externalLogos.subid as string,
paths: {
address: 'account'
},
url: 'https://sub.id'
};

View File

@ -0,0 +1,9 @@
<svg width="300" height="300" viewBox="0 0 300 300" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M150 300C232.843 300 300 232.843 300 150C300 67.1573 232.843 0 150 0C67.1573 0 0 67.1573 0 150C0 232.843 67.1573 300 150 300ZM63.2617 218H97.4414V75.8125H63.2617V218ZM131.27 75.8125V218H178.047C190.352 217.935 201.484 215.005 211.445 209.211C221.471 203.352 229.219 195.279 234.688 184.992C240.221 174.641 242.988 162.954 242.988 149.934V143.391C242.923 130.5 240.059 118.879 234.395 108.527C228.796 98.1107 220.983 90.0703 210.957 84.4062C200.931 78.6771 189.635 75.8125 177.07 75.8125H131.27ZM165.547 191.633V102.277H177.07C187.161 102.277 194.844 105.76 200.117 112.727C205.391 119.693 208.027 130.044 208.027 143.781V149.934C208.027 163.736 205.391 174.152 200.117 181.184C194.844 188.15 187.292 191.633 177.461 191.633H165.547Z" fill="url(#paint0_linear)"/>
<defs>
<linearGradient id="paint0_linear" x1="150" y1="0" x2="150" y2="300" gradientUnits="userSpaceOnUse">
<stop stop-color="#F50083"/>
<stop offset="1" stop-color="#720497"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -38,6 +38,7 @@ import externalPolkascan from './external/polkascan.png';
import externalPolkassembly from './external/polkassembly.png';
import externalPolkastats from './external/polkastats.png';
import externalStatescan from './external/statescan.svg';
import externalSubId from './external/subid.svg';
import externalSubscan from './external/subscan.svg';
import nodeAcala from './nodes/acala-circle.svg';
import nodeApron from './nodes/apron.png';
@ -610,6 +611,7 @@ export const externalLogos: Record<string, unknown> = {
polkassembly: externalPolkassembly,
polkastats: externalPolkastats,
statescan: externalStatescan,
subid: externalSubId,
subscan: externalSubscan
};