Add subsquare to external links (#6579)

* Add subsquare to external links

* Fix lint
This commit is contained in:
Yongfeng LI 2021-12-01 17:54:47 +08:00 committed by GitHub
parent 3ef0a560c0
commit 61df63c9f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 2 deletions

View File

@ -12,6 +12,7 @@ import Polkastats from './polkastats';
import Statescan from './statescan';
import SubId from './subid';
import Subscan from './subscan';
import Subsquare from './subsquare';
export const externalLinks: Record<string, ExternalDef> = {
Commonwealth,
@ -23,5 +24,6 @@ export const externalLinks: Record<string, ExternalDef> = {
Polkastats,
Statescan,
SubId,
Subscan
Subscan,
Subsquare
};

View File

@ -0,0 +1,26 @@
// 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: {
Karura: 'karura',
Khala: 'khala'
},
create: (chain: string, path: string, data: BN | number | string): string =>
`https://${chain}.subsquare.io/${path}/${data.toString()}`,
isActive: true,
logo: externalLogos.subsquare as string,
paths: {
bounty: 'treasury/bounty',
council: 'council/motion',
proposal: 'democracy/proposal',
referendum: 'democracy/referendum',
tip: 'treasury/tip',
treasury: 'treasury/proposal'
},
url: 'https://subsquare.io/'
};

View File

@ -0,0 +1,11 @@
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2905_26738)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.416 12.5097L10.5 6.34375L-0.415955 12.5097L10.5 19.2694L21.416 12.5097ZM17.5761 12.587L10.5 8.59009L3.42396 12.587L10.5 16.9689L17.5761 12.587Z" fill="#1E2134"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5 3.84009L3.42396 7.83705L10.5 12.2189L17.576 7.83705L10.5 3.84009ZM10.5 1.59375L-0.415955 7.75971L10.5 14.5194L21.416 7.75971L10.5 1.59375Z" fill="#6848FF"/>
</g>
<defs>
<clipPath id="clip0_2905_26738">
<rect width="19" height="19" fill="white" transform="translate(1 1)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 705 B

View File

@ -48,6 +48,7 @@ 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 externalSubsquare from './external/subsquare.svg';
import nodeApron from './nodes/apron.png';
import nodeAres from './nodes/ares.svg';
import nodeAresGladios from './nodes/ares-gladios.svg';
@ -693,7 +694,8 @@ export const externalLogos: Record<string, unknown> = {
polkastats: externalPolkastats,
statescan: externalStatescan,
subid: externalSubId,
subscan: externalSubscan
subscan: externalSubscan,
subsquare: externalSubsquare
};
// empty logos