Bump deps (w/ cleanups) (#4301)
This commit is contained in:
parent
edc978e949
commit
d548b838a2
20
package.json
20
package.json
@ -23,7 +23,7 @@
|
||||
"@polkadot/x-rxjs": "^3.2.4-5",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"styled-components": "^5.2.0",
|
||||
"typescript": "^4.1.2"
|
||||
"typescript": "^4.1.3"
|
||||
},
|
||||
"scripts": {
|
||||
"analyze": "yarn clean && BUILD_ANALYZE=1 yarn run build:code && yarn source-map-explorer packages/apps/build/main.*.js",
|
||||
@ -58,7 +58,7 @@
|
||||
"test": "polkadot-dev-run-test --selectProjects=fast-tests --silent --testPathIgnorePatterns slow --testNamePattern='^((?!--SLOW--).)*$'",
|
||||
"test:all": "polkadot-dev-run-test --selectProjects=all-tests --silent",
|
||||
"test:one": "polkadot-dev-run-test",
|
||||
"start": "yarn clean && cd packages/apps && yarn webpack --watch serve --config webpack.serve.js --port 3000",
|
||||
"start": "yarn clean && cd packages/apps && yarn webpack-cli serve --config webpack.serve.js --port 3000 --watch",
|
||||
"start:electron": "yarn clean:electronBuild && concurrently 'yarn build:devElectronMain && cd packages/apps-electron && electron ./build/electron.js' 'yarn build:devElectronRenderer'"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -69,23 +69,23 @@
|
||||
"@polkadot/dev": "^0.61.18",
|
||||
"@polkadot/ts": "^0.3.58",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"@types/chart.js": "^2.9.28",
|
||||
"@types/chart.js": "^2.9.29",
|
||||
"@types/file-saver": "^2.0.1",
|
||||
"@types/jest": "^26.0.19",
|
||||
"@types/react-beautiful-dnd": "^13.0.0",
|
||||
"@types/react-copy-to-clipboard": "^4.3.0",
|
||||
"@types/react-copy-to-clipboard": "^5.0.0",
|
||||
"@types/react-dom": "^17.0.0",
|
||||
"@types/react-router-dom": "^5.1.6",
|
||||
"@types/store": "^2.0.2",
|
||||
"@types/styled-components": "^5.1.5",
|
||||
"@types/styled-components": "^5.1.7",
|
||||
"@types/styled-theming": "^2.2.5",
|
||||
"concurrently": "^5.3.0",
|
||||
"devtron": "^1.4.0",
|
||||
"dnslink-cloudflare": "^3.0.0",
|
||||
"electron": "^10.1.7",
|
||||
"electron-builder": "^22.9.1",
|
||||
"electron": "^11.1.1",
|
||||
"electron-builder": "^22.10.4",
|
||||
"electron-builder-notarize": "^1.2.0",
|
||||
"i18next-scanner": "^2.11.0",
|
||||
"i18next-scanner": "^3.0.0",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-is": "^17.0.1",
|
||||
@ -94,7 +94,7 @@
|
||||
"stylelint": "^13.8.0",
|
||||
"stylelint-config-recommended": "^3.0.0",
|
||||
"stylelint-config-styled-components": "^0.1.1",
|
||||
"webpack": "^5.10.1",
|
||||
"webpack-cli": "^4.2.0"
|
||||
"webpack": "^5.11.1",
|
||||
"webpack-cli": "^4.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,14 +9,14 @@
|
||||
"contributors": [],
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@acala-network/type-definitions": "^0.5.1",
|
||||
"@acala-network/type-definitions": "^0.6.1",
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@edgeware/node-types": "^3.0.11",
|
||||
"@interlay/polkabtc-types": "^0.2.9",
|
||||
"@laminar/type-definitions": "^0.2.0-beta.141",
|
||||
"@polkadot/networks": "^5.2.2",
|
||||
"@sora-substrate/type-definitions": "^0.2.5",
|
||||
"@subsocial/types": "^0.4.26",
|
||||
"@sora-substrate/type-definitions": "^0.3.1",
|
||||
"@subsocial/types": "^0.4.27",
|
||||
"moonbeam-types-bundle": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -47,7 +47,7 @@ export function createOwn (t: TFunction): LinkOption[] {
|
||||
|
||||
return items.map((textBy) => ({
|
||||
info: 'local',
|
||||
text: t('rpc.custom.entry', 'Custom', { ns: 'apps-config' }),
|
||||
text: t('rpc.custom.own', 'Custom', { ns: 'apps-config' }),
|
||||
textBy,
|
||||
value: textBy
|
||||
}));
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@polkadot/dev": "^0.61.18",
|
||||
"@polkadot/react-components": "^0.73.2-17",
|
||||
"electron-log": "^4.3.0",
|
||||
"electron-updater": "^4.3.5"
|
||||
"electron-log": "^4.3.1",
|
||||
"electron-updater": "^4.3.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-dom": "^17.0.0",
|
||||
@ -21,6 +21,6 @@
|
||||
"react-dom": "^17.0.1",
|
||||
"thread-loader": "^3.0.1",
|
||||
"tmp": "^0.2.1",
|
||||
"webpack": "^5.10.1"
|
||||
"webpack": "^5.11.1"
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
"@polkadot/react-query": "^0.73.2-17",
|
||||
"@polkadot/react-signer": "^0.73.2-17",
|
||||
"punycode": "^2.1.1",
|
||||
"query-string": "^6.13.7"
|
||||
"query-string": "^6.13.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/punycode": "^2.1.0",
|
||||
@ -44,9 +44,9 @@
|
||||
"process": "^0.11.10",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.10.1",
|
||||
"webpack-cli": "^4.2.0",
|
||||
"webpack": "^5.11.1",
|
||||
"webpack-cli": "^4.3.0",
|
||||
"webpack-dev-server": "^4.0.0-beta.0",
|
||||
"webpack-merge": "^5.7.0"
|
||||
"webpack-merge": "^5.7.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
"rpc.crust.network": "Crust Maxwell CC2",
|
||||
"rpc.custom": "Custom environment",
|
||||
"rpc.custom.entry": "Custom {{WS_URL}}",
|
||||
"rpc.custom.own": "Custom",
|
||||
"rpc.darwinia": "Darwinia",
|
||||
"rpc.datahighway.harbour": "Harbour",
|
||||
"rpc.dock-mainnet": "Dock Mainnet",
|
||||
|
||||
@ -1296,7 +1296,8 @@
|
||||
"rpc.crab": "Darwinia Crab",
|
||||
"rpc.crust.network": "Crust Maxwell CC2",
|
||||
"rpc.custom": "Environment personnalisé",
|
||||
"rpc.custom.entry": "Personalisé",
|
||||
"rpc.custom.entry": "Personalisé {{WS_URL}}",
|
||||
"rpc.custom.own": "Personalisé",
|
||||
"rpc.datahighway.harbour": "Harbour",
|
||||
"rpc.dock-mainnet": "Dock Mainnet",
|
||||
"rpc.dock-testnet": "Dock Testnet",
|
||||
|
||||
@ -1261,6 +1261,7 @@
|
||||
"rpc.crust.network": "크러스트 맥스엘 CC2",
|
||||
"rpc.custom": "특수 설정",
|
||||
"rpc.custom.entry": "커스텀 {{WS_URL}}",
|
||||
"rpc.custom.own": "커스텀",
|
||||
"rpc.datahighway.harbour": "항구",
|
||||
"rpc.dock-mainnet": "독 메인넷",
|
||||
"rpc.dock-testnet": "독 테스트넷",
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
return useTranslationBase(['apps', 'apps-routing']);
|
||||
export function useTranslation (): UseTranslationResponse<'apps'> {
|
||||
return useTranslationBase('apps');
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@ module.exports = merge(
|
||||
{
|
||||
devServer: {
|
||||
open: false,
|
||||
port: 3000,
|
||||
static: path.resolve(__dirname, 'build')
|
||||
},
|
||||
plugins: [
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-accounts'> {
|
||||
return useTranslationBase('app-accounts');
|
||||
}
|
||||
|
||||
@ -15,6 +15,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/react": "^11.2.2",
|
||||
"testcontainers": "^6.4.0"
|
||||
"testcontainers": "^6.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-addresses'> {
|
||||
return useTranslationBase('app-addresses');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-bounties'> {
|
||||
return useTranslationBase('app-bounties');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-calendar'> {
|
||||
return useTranslationBase('app-calendar');
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import { Trans } from 'react-i18next';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Button, Card, Columar, Column, Input, InputAddress, Tabs, Tooltip } from '@polkadot/react-components';
|
||||
import { Button, Card, Columar, Input, InputAddress, Tabs, Tooltip } from '@polkadot/react-components';
|
||||
import { TokenUnit } from '@polkadot/react-components/InputNumber';
|
||||
import { useApi, useCall } from '@polkadot/react-hooks';
|
||||
import { u8aToHex, u8aToString } from '@polkadot/util';
|
||||
@ -198,7 +198,7 @@ function ClaimsApp ({ basePath }: Props): React.ReactElement<Props> {
|
||||
<Trans>Claim your <em>{TokenUnit.abbr}</em> tokens</Trans>
|
||||
</h1>
|
||||
<Columar>
|
||||
<Column>
|
||||
<Columar.Column>
|
||||
<Card withBottomMargin>
|
||||
<h3>{t<string>('1. Select your {{chain}} account', {
|
||||
replace: {
|
||||
@ -296,8 +296,8 @@ function ClaimsApp ({ basePath }: Props): React.ReactElement<Props> {
|
||||
)}
|
||||
</Card>
|
||||
)}
|
||||
</Column>
|
||||
<Column showEmptyText={false}>
|
||||
</Columar.Column>
|
||||
<Columar.Column>
|
||||
{(step >= Step.Claim) && (
|
||||
isPreclaimed
|
||||
? <AttestDisplay
|
||||
@ -316,7 +316,7 @@ function ClaimsApp ({ basePath }: Props): React.ReactElement<Props> {
|
||||
statementKind={statementKind}
|
||||
/>
|
||||
)}
|
||||
</Column>
|
||||
</Columar.Column>
|
||||
</Columar>
|
||||
</main>
|
||||
);
|
||||
|
||||
@ -5,7 +5,7 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-claims'> {
|
||||
return useTranslationBase('app-claims');
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-contracts'> {
|
||||
return useTranslationBase('app-contracts');
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-council'> {
|
||||
return useTranslationBase('app-council');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-democracy'> {
|
||||
return useTranslationBase('app-democracy');
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ import React, { useEffect, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import { HeaderExtended } from '@polkadot/api-derive';
|
||||
import { AddressSmall, Columar, Column, LinkExternal, Table } from '@polkadot/react-components';
|
||||
import { AddressSmall, Columar, LinkExternal, Table } from '@polkadot/react-components';
|
||||
import { useApi, useIsMountedRef } from '@polkadot/react-hooks';
|
||||
import { formatNumber } from '@polkadot/util';
|
||||
|
||||
@ -113,16 +113,16 @@ function BlockByHash ({ className = '', error, value }: Props): React.ReactEleme
|
||||
value={getBlock.block.extrinsics}
|
||||
/>
|
||||
<Columar>
|
||||
<Column>
|
||||
<Columar.Column>
|
||||
<Events
|
||||
eventClassName='explorer--BlockByHash-block'
|
||||
events={events?.filter(({ record: { phase } }) => !phase.isApplyExtrinsic)}
|
||||
label={t<string>('system events')}
|
||||
/>
|
||||
</Column>
|
||||
<Column>
|
||||
</Columar.Column>
|
||||
<Columar.Column>
|
||||
<Logs value={getHeader.digest.logs} />
|
||||
</Column>
|
||||
</Columar.Column>
|
||||
</Columar>
|
||||
</>
|
||||
)}
|
||||
|
||||
@ -6,7 +6,7 @@ import type { KeyedEvent } from '@polkadot/react-query/types';
|
||||
import React from 'react';
|
||||
|
||||
import { HeaderExtended } from '@polkadot/api-derive';
|
||||
import { Columar, Column } from '@polkadot/react-components';
|
||||
import { Columar } from '@polkadot/react-components';
|
||||
|
||||
import BlockHeaders from './BlockHeaders';
|
||||
import Events from './Events';
|
||||
@ -24,12 +24,12 @@ function Main ({ events, headers }: Props): React.ReactElement<Props> {
|
||||
<Query />
|
||||
<Summary />
|
||||
<Columar>
|
||||
<Column>
|
||||
<Columar.Column>
|
||||
<BlockHeaders headers={headers} />
|
||||
</Column>
|
||||
<Column>
|
||||
</Columar.Column>
|
||||
<Columar.Column>
|
||||
<Events events={events} />
|
||||
</Column>
|
||||
</Columar.Column>
|
||||
</Columar>
|
||||
</>
|
||||
);
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-explorer'> {
|
||||
return useTranslationBase('app-explorer');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-extrinsics'> {
|
||||
return useTranslationBase('app-extrinsics');
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-generic-asset'> {
|
||||
return useTranslationBase('app-generic-asset');
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-js'> {
|
||||
return useTranslationBase('app-js');
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@ import React, { useCallback } from 'react';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Button, CardSummary, Columar, Column, Icon, Menu, Popup, Spinner, SummaryBox } from '@polkadot/react-components';
|
||||
import { Button, CardSummary, Columar, Icon, Menu, Popup, Spinner, SummaryBox } from '@polkadot/react-components';
|
||||
import { useApi, useCall, useModal, useToggle } from '@polkadot/react-hooks';
|
||||
import { isNull, isUndefined } from '@polkadot/util';
|
||||
|
||||
@ -113,12 +113,12 @@ function Parachain ({ basePath, className = '', isMine, paraInfoRef, sudoKey }:
|
||||
</section>
|
||||
</SummaryBox>
|
||||
<Columar>
|
||||
<Column>
|
||||
<Columar.Column>
|
||||
<Details parachain={parachain} />
|
||||
</Column>
|
||||
<Column>
|
||||
</Columar.Column>
|
||||
<Columar.Column>
|
||||
<DispatchQueue dispatchQueue={parachain.relayDispatchQueue} />
|
||||
</Column>
|
||||
</Columar.Column>
|
||||
</Columar>
|
||||
{(sudoKey && isMine) && (
|
||||
<Deregister
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-parachains'> {
|
||||
return useTranslationBase('app-parachains');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-poll'> {
|
||||
return useTranslationBase('app-poll');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-rpc'> {
|
||||
return useTranslationBase('app-rpc');
|
||||
}
|
||||
|
||||
@ -13,6 +13,6 @@
|
||||
"@polkadot/apps-config": "^0.73.2-17",
|
||||
"@polkadot/react-components": "^0.73.2-17",
|
||||
"@polkadot/react-query": "^0.73.2-17",
|
||||
"query-string": "^6.13.7"
|
||||
"query-string": "^6.13.8"
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import FileSaver from 'file-saver';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Button, Columar, Column, Dropdown, Progress, Spinner, Toggle } from '@polkadot/react-components';
|
||||
import { Button, Columar, Dropdown, Progress, Spinner, Toggle } from '@polkadot/react-components';
|
||||
import i18n from '@polkadot/react-components/i18n';
|
||||
import languageCache from '@polkadot/react-components/i18n/cache';
|
||||
import { useToggle } from '@polkadot/react-hooks';
|
||||
@ -217,7 +217,7 @@ function Translate ({ className }: Props): React.ReactElement<Props> {
|
||||
<main className={className}>
|
||||
<header>
|
||||
<Columar>
|
||||
<Column>
|
||||
<Columar.Column>
|
||||
<div>
|
||||
<Dropdown
|
||||
isFull
|
||||
@ -233,8 +233,8 @@ function Translate ({ className }: Props): React.ReactElement<Props> {
|
||||
total={modProgress[1]}
|
||||
value={modProgress[0]}
|
||||
/>
|
||||
</Column>
|
||||
<Column>
|
||||
</Columar.Column>
|
||||
<Columar.Column>
|
||||
<div>
|
||||
<Dropdown
|
||||
isFull
|
||||
@ -250,7 +250,7 @@ function Translate ({ className }: Props): React.ReactElement<Props> {
|
||||
total={allProgress[record]?.[1]}
|
||||
value={allProgress[record]?.[0]}
|
||||
/>
|
||||
</Column>
|
||||
</Columar.Column>
|
||||
</Columar>
|
||||
</header>
|
||||
<div className='toggleWrapper'>
|
||||
|
||||
@ -7,7 +7,7 @@ import type { ChainInfo } from '../types';
|
||||
import React, { useCallback, useEffect, useReducer, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Button, ChainImg, Columar, Column, Input, QrNetworkSpecs, Spinner } from '@polkadot/react-components';
|
||||
import { Button, ChainImg, Columar, Input, QrNetworkSpecs, Spinner } from '@polkadot/react-components';
|
||||
import { useApi, useDebounce } from '@polkadot/react-hooks';
|
||||
|
||||
import { useTranslation } from '../translate';
|
||||
@ -87,7 +87,7 @@ function NetworkSpecs ({ chainInfo, className }: Props): React.ReactElement<Prop
|
||||
|
||||
return (
|
||||
<Columar className={className}>
|
||||
<Column>
|
||||
<Columar.Column>
|
||||
<div className='settings--networkSpecs-name'>
|
||||
<Input
|
||||
className='full'
|
||||
@ -144,15 +144,15 @@ function NetworkSpecs ({ chainInfo, className }: Props): React.ReactElement<Prop
|
||||
label={t<string>('Decimals')}
|
||||
value={networkSpecs.decimals.toString()}
|
||||
/>
|
||||
</Column>
|
||||
<Column>
|
||||
</Columar.Column>
|
||||
<Columar.Column>
|
||||
{qrData.genesisHash && (
|
||||
<QrNetworkSpecs
|
||||
className='settings--networkSpecs-qr'
|
||||
networkSpecs={debouncedQrData}
|
||||
/>
|
||||
)}
|
||||
</Column>
|
||||
</Columar.Column>
|
||||
</Columar>
|
||||
);
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-settings'> {
|
||||
return useTranslationBase('app-settings');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-signing'> {
|
||||
return useTranslationBase('app-signing');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-society'> {
|
||||
return useTranslationBase('app-society');
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@ import type { Props } from './types';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Columar, Column } from '@polkadot/react-components';
|
||||
import { Columar } from '@polkadot/react-components';
|
||||
|
||||
import ChartPoints from './ChartPoints';
|
||||
import ChartPrefs from './ChartPrefs';
|
||||
@ -16,14 +16,14 @@ import ChartStake from './ChartStake';
|
||||
function Validator ({ className = '', validatorId }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<Columar className={className}>
|
||||
<Column>
|
||||
<Columar.Column>
|
||||
<ChartPoints validatorId={validatorId} />
|
||||
<ChartRewards validatorId={validatorId} />
|
||||
</Column>
|
||||
<Column>
|
||||
</Columar.Column>
|
||||
<Columar.Column>
|
||||
<ChartStake validatorId={validatorId} />
|
||||
<ChartPrefs validatorId={validatorId} />
|
||||
</Column>
|
||||
</Columar.Column>
|
||||
</Columar>
|
||||
);
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-staking'> {
|
||||
return useTranslationBase('app-staking');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-storage'> {
|
||||
return useTranslationBase('app-storage');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-sudo'> {
|
||||
return useTranslationBase('app-sudo');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-tech-comm'> {
|
||||
return useTranslationBase('app-tech-comm');
|
||||
}
|
||||
|
||||
@ -5,6 +5,6 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'app-treasury'> {
|
||||
return useTranslationBase('app-treasury');
|
||||
}
|
||||
|
||||
@ -18,6 +18,6 @@
|
||||
"@polkadot/api": "^3.2.4-5",
|
||||
"@polkadot/extension-dapp": "^0.35.2-25",
|
||||
"@polkadot/x-rxjs": "^3.2.4-5",
|
||||
"fflate": "^0.4.2"
|
||||
"fflate": "^0.4.7"
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
"@babel/runtime": "^7.12.5",
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
||||
"@fortawesome/react-fontawesome": "^0.1.13",
|
||||
"@fortawesome/react-fontawesome": "^0.1.14",
|
||||
"@polkadot/keyring": "^5.2.2",
|
||||
"@polkadot/react-api": "^0.73.2-17",
|
||||
"@polkadot/react-identicon": "^0.65.1",
|
||||
@ -24,7 +24,7 @@
|
||||
"chart.js": "^2.9.4",
|
||||
"codeflask": "^1.4.1",
|
||||
"i18next": "^19.8.4",
|
||||
"i18next-browser-languagedetector": "^5.0.1",
|
||||
"i18next-browser-languagedetector": "^6.0.1",
|
||||
"owasp-password-strength-test": "^1.3.0",
|
||||
"react": "^17.0.1",
|
||||
"react-beautiful-dnd": "^13.0.0",
|
||||
@ -32,9 +32,9 @@
|
||||
"react-copy-to-clipboard": "^5.0.2",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-dropzone": "^11.2.4",
|
||||
"react-i18next": "^11.8.3",
|
||||
"react-i18next": "^11.8.5",
|
||||
"react-is": "^17.0.1",
|
||||
"react-markdown": "^4.3.1",
|
||||
"react-markdown": "^5.0.3",
|
||||
"react-router": "^5.2.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"react-tooltip": "^4.2.11",
|
||||
|
||||
@ -4,18 +4,29 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import Column from './Column';
|
||||
|
||||
interface Props {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
is60?: boolean;
|
||||
}
|
||||
|
||||
interface ColumnProps {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
type ColumarType = React.ComponentType<Props> & {
|
||||
Column: React.ComponentType<Props>;
|
||||
Column: React.ComponentType<ColumnProps>;
|
||||
};
|
||||
|
||||
function Column ({ children, className = '' }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div className={`ui--Column ${className}`}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function Columar ({ children, className = '', is60 }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div className={`ui--Columnar ${is60 ? 'is60' : 'is50'} ${className}`}>
|
||||
@ -24,7 +35,7 @@ function Columar ({ children, className = '', is60 }: Props): React.ReactElement
|
||||
);
|
||||
}
|
||||
|
||||
const ColumarExp = React.memo(styled(Columar)`
|
||||
const ColumarStyled = React.memo(styled(Columar)`
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@ -54,6 +65,25 @@ const ColumarExp = React.memo(styled(Columar)`
|
||||
}
|
||||
`) as unknown as ColumarType;
|
||||
|
||||
ColumarExp.Column = Column;
|
||||
ColumarStyled.Column = React.memo(styled(Column)`
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
flex: 1 1;
|
||||
margin: 0;
|
||||
padding: 0 0.75rem;
|
||||
|
||||
export default ColumarExp;
|
||||
&:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 1025px) {
|
||||
max-width: 50%;
|
||||
min-width: 50%;
|
||||
}
|
||||
`);
|
||||
|
||||
export default ColumarStyled;
|
||||
|
||||
@ -1,68 +0,0 @@
|
||||
// Copyright 2017-2020 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import Collection, { CollectionProps as Props, CollectionState as State, collectionStyles } from './Collection';
|
||||
import translate from './translate';
|
||||
|
||||
class Column extends Collection<Props, State> {
|
||||
public render (): React.ReactNode {
|
||||
const { className = '' } = this.props;
|
||||
const { isEmpty } = this.state;
|
||||
|
||||
return (
|
||||
<div className={`ui--Column ${className}`}>
|
||||
{this.renderHeader()}
|
||||
{isEmpty && this.renderEmpty()}
|
||||
{this.renderCollection()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
public renderCollection (): React.ReactNode {
|
||||
const { children } = this.props;
|
||||
|
||||
return children;
|
||||
}
|
||||
}
|
||||
|
||||
export default translate(
|
||||
styled(Column as React.ComponentClass<Props, State>)`
|
||||
${collectionStyles}
|
||||
|
||||
box-sizing: border-box;
|
||||
max-width: 100%;
|
||||
flex: 1 1;
|
||||
margin: 0;
|
||||
padding: 0 0.75rem;
|
||||
|
||||
&:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
article {
|
||||
border: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
article+article {
|
||||
border-top: 1px solid #f2f2f2;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1025px) {
|
||||
max-width: 50%;
|
||||
min-width: 50%;
|
||||
}
|
||||
`
|
||||
);
|
||||
@ -1,8 +1,10 @@
|
||||
// Copyright 2017-2020 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DropdownProps } from 'semantic-ui-react';
|
||||
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { Button as SUIButton, Dropdown as SUIDropdown, DropdownProps } from 'semantic-ui-react';
|
||||
import { Button as SUIButton, Dropdown as SUIDropdown } from 'semantic-ui-react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { isUndefined } from '@polkadot/util';
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
// Copyright 2017-2020 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
import { Label } from 'semantic-ui-react';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
label?: React.ReactNode;
|
||||
}
|
||||
|
||||
const defaultLabel: React.ReactNode = (
|
||||
<div> </div>
|
||||
);
|
||||
|
||||
function InputError ({ className = '', label = defaultLabel }: Props): React.ReactElement<Props> {
|
||||
return (
|
||||
<div className={`ui--InputError ${className}`}>
|
||||
<Label
|
||||
color='red'
|
||||
pointing='left'
|
||||
>
|
||||
{label}
|
||||
</Label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default React.memo(InputError);
|
||||
@ -8,7 +8,9 @@ import styled from 'styled-components';
|
||||
|
||||
function Column ({ children, className = '' }: ColumnProps): React.ReactElement<ColumnProps> {
|
||||
return (
|
||||
<div className={`ui--Modal-Column ${className}`}>{children}</div>
|
||||
<div className={`ui--Modal-Column ${className}`}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
// Copyright 2017-2020 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PopupProps } from 'semantic-ui-react';
|
||||
|
||||
import React from 'react';
|
||||
import { Popup as SUIPopup, PopupProps } from 'semantic-ui-react';
|
||||
import { Popup as SUIPopup } from 'semantic-ui-react';
|
||||
|
||||
interface Props {
|
||||
children: React.ReactNode;
|
||||
|
||||
@ -29,7 +29,6 @@ export { default as ChainLock } from './ChainLock';
|
||||
export { default as Chart } from './Chart';
|
||||
export { default as Checkbox } from './Checkbox';
|
||||
export { default as Columar } from './Columar';
|
||||
export { default as Column } from './Column';
|
||||
export { default as ConvictionDropdown } from './ConvictionDropdown';
|
||||
export { default as CopyButton } from './CopyButton';
|
||||
export { default as CryptoType } from './CryptoType';
|
||||
@ -53,7 +52,6 @@ export { default as InputAddressMulti } from './InputAddressMulti';
|
||||
export { default as InputAddressSimple } from './InputAddressSimple';
|
||||
export { default as InputBalance } from './InputBalance';
|
||||
export { default as InputConsts } from './InputConsts';
|
||||
export { default as InputError } from './InputError';
|
||||
export { default as InputExtrinsic } from './InputExtrinsic';
|
||||
export { default as InputFile } from './InputFile';
|
||||
export { default as InputNumber } from './InputNumber';
|
||||
|
||||
@ -5,7 +5,7 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'react-components'> {
|
||||
return useTranslationBase('react-components');
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'react-hooks'> {
|
||||
return useTranslationBase('react-hooks');
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'react-params'> {
|
||||
return useTranslationBase('react-params');
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'react-query'> {
|
||||
return useTranslationBase('react-query');
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ import type { UseTranslationResponse } from 'react-i18next';
|
||||
|
||||
import { useTranslation as useTranslationBase, withTranslation } from 'react-i18next';
|
||||
|
||||
export function useTranslation (): UseTranslationResponse<string> {
|
||||
export function useTranslation (): UseTranslationResponse<'react-signer'> {
|
||||
return useTranslationBase('react-signer');
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,6 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@testing-library/react": "^11.2.2",
|
||||
"testcontainers": "^6.4.0"
|
||||
"testcontainers": "^6.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user