diff --git a/lerna.json b/lerna.json index 773ae70a0f..7acfd8ce3f 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "packages": [ "packages/*" ], - "version": "0.19.33" + "version": "0.19.34" } diff --git a/package.json b/package.json index 58b05aa68a..d2e416522f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.19.33", + "version": "0.19.34", "private": true, "engines": { "node": "^10.1.0", diff --git a/packages/app-accounts/package.json b/packages/app-accounts/package.json index a2e5a754da..dedfc09980 100644 --- a/packages/app-accounts/package.json +++ b/packages/app-accounts/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-accounts", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,13 +9,8 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/ui-app": "^0.19.33" + "@polkadot/ui-app": "^0.19.34" } } diff --git a/packages/app-accounts/src/index.tsx b/packages/app-accounts/src/index.tsx index 258539c022..20983e87ad 100644 --- a/packages/app-accounts/src/index.tsx +++ b/packages/app-accounts/src/index.tsx @@ -17,7 +17,9 @@ import Creator from './Creator'; import Editor from './Editor'; import translate from './translate'; -type Props = I18nProps & {}; +type Props = I18nProps & { + basePath: string +}; type Actions = 'create' | 'edit'; diff --git a/packages/app-addresses/package.json b/packages/app-addresses/package.json index 2d5d8623f4..9c8352a975 100644 --- a/packages/app-addresses/package.json +++ b/packages/app-addresses/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-addresses", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,13 +9,8 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/ui-app": "^0.19.33" + "@polkadot/ui-app": "^0.19.34" } } diff --git a/packages/app-addresses/src/index.tsx b/packages/app-addresses/src/index.tsx index 8fd86ddf05..3735b6196a 100644 --- a/packages/app-addresses/src/index.tsx +++ b/packages/app-addresses/src/index.tsx @@ -18,7 +18,9 @@ import Creator from './Creator'; import Editor from './Editor'; import translate from './translate'; -type Props = I18nProps & {}; +type Props = I18nProps & { + basePath: string +}; type Actions = 'create' | 'edit'; diff --git a/packages/app-democracy/package.json b/packages/app-democracy/package.json index 1852f7ae27..419904eccf 100644 --- a/packages/app-democracy/package.json +++ b/packages/app-democracy/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-democracy", - "version": "0.19.33", + "version": "0.19.34", "description": "A referendum & proposal app", "main": "index.js", "scripts": {}, @@ -12,8 +12,8 @@ "dependencies": { "@babel/runtime": "^7.0.0-rc.1", "@polkadot/storage": "^0.28.14", - "@polkadot/ui-react": "^0.19.33", - "@polkadot/ui-react-rx": "^0.19.33", + "@polkadot/ui-react": "^0.19.34", + "@polkadot/ui-react-rx": "^0.19.34", "@polkadot/util-keyring": "^0.28.2" } } diff --git a/packages/app-democracy/src/index.tsx b/packages/app-democracy/src/index.tsx index 3f47153355..cb5210cf84 100644 --- a/packages/app-democracy/src/index.tsx +++ b/packages/app-democracy/src/index.tsx @@ -13,7 +13,9 @@ import Proposals from './Proposals'; import Referendums from './Referendums'; import Summary from './Summary'; -type Props = BareProps & {}; +type Props = BareProps & { + basePath: string +}; export default class App extends React.PureComponent { render () { diff --git a/packages/app-example/package.json b/packages/app-example/package.json index 639154d82d..bd6778f914 100644 --- a/packages/app-example/package.json +++ b/packages/app-example/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-example", - "version": "0.19.33", + "version": "0.19.34", "description": "A basic example app", "main": "index.js", "scripts": {}, @@ -12,8 +12,8 @@ "dependencies": { "@babel/runtime": "^7.0.0-rc.1", "@polkadot/storage": "^0.28.14", - "@polkadot/ui-react": "^0.19.33", - "@polkadot/ui-react-rx": "^0.19.33", + "@polkadot/ui-react": "^0.19.34", + "@polkadot/ui-react-rx": "^0.19.34", "@polkadot/util-keyring": "^0.28.2" } } diff --git a/packages/app-example/src/index.tsx b/packages/app-example/src/index.tsx index 96eb089bd7..2c6d206db7 100644 --- a/packages/app-example/src/index.tsx +++ b/packages/app-example/src/index.tsx @@ -2,6 +2,8 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. +import { BareProps } from '@polkadot/ui-app/types'; + import React from 'react'; import Navigation from '@polkadot/ui-app/Navigation'; import Page from '@polkadot/ui-app/Page'; @@ -19,12 +21,16 @@ const Components: { [index: string]: React.ComponentType } = { Tut002, Tut003, Tut004, Tut005, Tut006, Tut007 }; +type Props = BareProps & { + basePath: string +}; + type State = { Component: React.ComponentType }; -export default class App extends React.PureComponent { - constructor (props: any) { +export default class App extends React.PureComponent { + constructor (props: Props) { super(props); this.state = { diff --git a/packages/app-explorer/package.json b/packages/app-explorer/package.json index 2043a6df0a..68b235202f 100644 --- a/packages/app-explorer/package.json +++ b/packages/app-explorer/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-explorer", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,15 +9,10 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", "@polkadot/primitives": "^0.28.14", - "@polkadot/ui-app": "^0.19.33", + "@polkadot/ui-app": "^0.19.34", "@polkadot/util-crypto": "^0.28.2" } } diff --git a/packages/app-explorer/src/index.tsx b/packages/app-explorer/src/index.tsx index 0272bc770b..d15e147bea 100644 --- a/packages/app-explorer/src/index.tsx +++ b/packages/app-explorer/src/index.tsx @@ -13,7 +13,9 @@ import classes from '@polkadot/ui-app/util/classes'; import Summary from './Summary'; import BlockHeaders from './BlockHeaders'; -type Props = BareProps & {}; +type Props = BareProps & { + basePath: string +}; export default class ExplorerApp extends React.PureComponent { render () { diff --git a/packages/app-extrinsics/package.json b/packages/app-extrinsics/package.json index 696337d127..98297dc888 100644 --- a/packages/app-extrinsics/package.json +++ b/packages/app-extrinsics/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-extrinsics", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,16 +9,11 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", "@polkadot/extrinsics": "^0.28.14", - "@polkadot/ui-app": "^0.19.33", - "@polkadot/ui-signer": "^0.19.33", + "@polkadot/ui-app": "^0.19.34", + "@polkadot/ui-signer": "^0.19.34", "react-dropzone": "^4.2.9" } } diff --git a/packages/app-extrinsics/src/index.tsx b/packages/app-extrinsics/src/index.tsx index d8ea54d706..2e04e0eb95 100644 --- a/packages/app-extrinsics/src/index.tsx +++ b/packages/app-extrinsics/src/index.tsx @@ -14,7 +14,9 @@ import { QueueConsumer } from '@polkadot/ui-signer/Context'; import Selection from './Selection'; -type Props = BareProps; +type Props = BareProps & { + basePath: string +}; export default class ExtrinsicsApp extends React.PureComponent { render () { diff --git a/packages/app-rpc/package.json b/packages/app-rpc/package.json index 3549fbbb28..938254bcac 100644 --- a/packages/app-rpc/package.json +++ b/packages/app-rpc/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-rpc", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,15 +9,10 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/ui-app": "^0.19.33", - "@polkadot/ui-keyring": "^0.19.33", - "@polkadot/ui-signer": "^0.19.33" + "@polkadot/ui-app": "^0.19.34", + "@polkadot/ui-keyring": "^0.19.34", + "@polkadot/ui-signer": "^0.19.34" } } diff --git a/packages/app-rpc/src/index.tsx b/packages/app-rpc/src/index.tsx index 035e9275f6..d97bc2646d 100644 --- a/packages/app-rpc/src/index.tsx +++ b/packages/app-rpc/src/index.tsx @@ -15,7 +15,9 @@ import { QueueConsumer } from '@polkadot/ui-signer/Context'; import Results from './Results'; import Selection from './Selection'; -type Props = BareProps & {}; +type Props = BareProps & { + basePath: string +}; export default class RpcApp extends React.PureComponent { render () { diff --git a/packages/app-staking/package.json b/packages/app-staking/package.json index 10e7fb27c3..646207eae5 100644 --- a/packages/app-staking/package.json +++ b/packages/app-staking/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-staking", - "version": "0.19.33", + "version": "0.19.34", "description": "A basic staking app", "main": "index.js", "scripts": {}, @@ -11,12 +11,12 @@ "license": "ISC", "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/app-extrinsics": "^0.19.33", + "@polkadot/app-extrinsics": "^0.19.34", "@polkadot/storage": "^0.28.14", - "@polkadot/ui-app": "^0.19.33", - "@polkadot/ui-keyring": "^0.19.33", - "@polkadot/ui-react": "^0.19.33", - "@polkadot/ui-react-rx": "^0.19.33", + "@polkadot/ui-app": "^0.19.34", + "@polkadot/ui-keyring": "^0.19.34", + "@polkadot/ui-react": "^0.19.34", + "@polkadot/ui-react-rx": "^0.19.34", "@polkadot/util-keyring": "^0.28.2" } } diff --git a/packages/app-staking/src/index.tsx b/packages/app-staking/src/index.tsx index 70f50d2d6a..737251e3c8 100644 --- a/packages/app-staking/src/index.tsx +++ b/packages/app-staking/src/index.tsx @@ -17,6 +17,7 @@ import StakeList from './StakeList'; import Summary from './Summary'; type Props = BareProps & { + basePath: string, validatingBalances?: RxBalanceMap, stakingIntentions?: Array, sessionValidators?: Array diff --git a/packages/app-storage/package.json b/packages/app-storage/package.json index dac3724a38..540174b1ab 100644 --- a/packages/app-storage/package.json +++ b/packages/app-storage/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-storage", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,13 +9,8 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/ui-app": "^0.19.33" + "@polkadot/ui-app": "^0.19.34" } } diff --git a/packages/app-storage/src/index.tsx b/packages/app-storage/src/index.tsx index 9505d08bfa..10d3881c06 100644 --- a/packages/app-storage/src/index.tsx +++ b/packages/app-storage/src/index.tsx @@ -15,7 +15,9 @@ import Queries from './Queries'; import Selection from './Selection'; import translate from './translate'; -type Props = I18nProps & {}; +type Props = I18nProps & { + basePath: string +}; type State = { queue: Array diff --git a/packages/app-toolbox/package.json b/packages/app-toolbox/package.json index fa03a2bd95..b3500775e3 100644 --- a/packages/app-toolbox/package.json +++ b/packages/app-toolbox/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-toolbox", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,14 +9,9 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/ui-app": "^0.19.33", - "@polkadot/ui-keyring": "^0.19.33" + "@polkadot/ui-app": "^0.19.34", + "@polkadot/ui-keyring": "^0.19.34" } } diff --git a/packages/app-toolbox/src/index.tsx b/packages/app-toolbox/src/index.tsx index 14a3eed200..0cac859199 100644 --- a/packages/app-toolbox/src/index.tsx +++ b/packages/app-toolbox/src/index.tsx @@ -19,7 +19,9 @@ import translate from './translate'; type Actions = 'hash' | 'sign' | 'verify'; -type Props = I18nProps & {}; +type Props = I18nProps & { + basePath: string +}; type State = { action: Actions diff --git a/packages/app-vanitygen/package.json b/packages/app-vanitygen/package.json index 64b1461a82..2c79952851 100644 --- a/packages/app-vanitygen/package.json +++ b/packages/app-vanitygen/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/app-vanitygen", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,14 +9,9 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/ui-app": "^0.19.33", + "@polkadot/ui-app": "^0.19.34", "@types/yargs": "^11.0.0", "babel-plugin-module-resolver": "^3.1.1", "chalk": "^2.4.1", diff --git a/packages/app-vanitygen/src/index.tsx b/packages/app-vanitygen/src/index.tsx index 7a4f31493d..0ca5dc0c09 100644 --- a/packages/app-vanitygen/src/index.tsx +++ b/packages/app-vanitygen/src/index.tsx @@ -21,7 +21,9 @@ import matchRegex from './generator/regex'; import generatorSort from './generator/sort'; import translate from './translate'; -type Props = I18nProps & {}; +type Props = I18nProps & { + basePath: string +}; type State = { elapsed: number, diff --git a/packages/apps/package.json b/packages/apps/package.json index 67808edf85..85e5f5c8f8 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/apps", - "version": "0.19.33", + "version": "0.19.34", "description": "An Apps portal into the Polkadot network", "main": "index.js", "homepage": ".", @@ -11,25 +11,21 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/app-accounts": "^0.19.33", - "@polkadot/app-addresses": "^0.19.33", - "@polkadot/app-democracy": "^0.19.33", - "@polkadot/app-example": "^0.19.33", - "@polkadot/app-explorer": "^0.19.33", - "@polkadot/app-extrinsics": "^0.19.33", - "@polkadot/app-rpc": "^0.19.33", - "@polkadot/app-staking": "^0.19.33", - "@polkadot/app-storage": "^0.19.33", - "@polkadot/app-toolbox": "^0.19.33", - "@polkadot/app-vanitygen": "^0.19.33", - "@polkadot/ui-app": "^0.19.33", - "@polkadot/ui-signer": "^0.19.33" + "@polkadot/app-accounts": "^0.19.34", + "@polkadot/app-addresses": "^0.19.34", + "@polkadot/app-democracy": "^0.19.34", + "@polkadot/app-example": "^0.19.34", + "@polkadot/app-explorer": "^0.19.34", + "@polkadot/app-extrinsics": "^0.19.34", + "@polkadot/app-rpc": "^0.19.34", + "@polkadot/app-staking": "^0.19.34", + "@polkadot/app-storage": "^0.19.34", + "@polkadot/app-toolbox": "^0.19.34", + "@polkadot/app-vanitygen": "^0.19.34", + "@polkadot/ui-app": "^0.19.34", + "@polkadot/ui-signer": "^0.19.34" }, "devDependencies": { "babel-loader": "^8.0.0-beta.2", diff --git a/packages/apps/src/Content/NotFound.tsx b/packages/apps/src/Content/NotFound.tsx new file mode 100644 index 0000000000..d1409605cd --- /dev/null +++ b/packages/apps/src/Content/NotFound.tsx @@ -0,0 +1,20 @@ +// Copyright 2017-2018 @polkadot/apps authors & contributors +// This software may be modified and distributed under the terms +// of the ISC license. See the LICENSE file for details. + +import React from 'react'; +import { Redirect } from 'react-router'; + +import routing from '../routing'; + +type Props = {}; + +const defaultTo = `/${routing.default}`; + +export default class NotFound extends React.PureComponent { + render () { + return ( + + ); + } +} diff --git a/packages/apps/src/Content/index.tsx b/packages/apps/src/Content/index.tsx index 10723b94ae..edf3e68fcf 100644 --- a/packages/apps/src/Content/index.tsx +++ b/packages/apps/src/Content/index.tsx @@ -3,7 +3,6 @@ // of the ISC license. See the LICENSE file for details. import { I18nProps } from '@polkadot/ui-app/types'; -import { Route } from '../types'; import './Content.css'; @@ -13,28 +12,32 @@ import { withRouter } from 'react-router'; import classes from '@polkadot/ui-app/util/classes'; import routing from '../routing'; +import NotFound from './NotFound'; type Props = I18nProps & { location: Location }; +const unknown = { + Component: NotFound, + name: '' +}; + class Content extends React.PureComponent { render () { const { className, location, style } = this.props; - const app = location.pathname.slice(1) || routing.default; - const { Component } = routing.routes.find((route: Route | null) => - route - ? route.name === app - : false - ) || routing.unknown; + const app = location.pathname.slice(1) || ''; + const { Component, name } = routing.routes.find((route) => + !!(route && app.indexOf(route.name) === 0) + ) || unknown; return (
- +
); } diff --git a/packages/apps/src/NotFound/NotFound.css b/packages/apps/src/NotFound/NotFound.css deleted file mode 100644 index 97e7701241..0000000000 --- a/packages/apps/src/NotFound/NotFound.css +++ /dev/null @@ -1,7 +0,0 @@ -/* Copyright 2017-2018 @polkadot/apps authors & contributors -/* This software may be modified and distributed under the terms -/* of the ISC license. See the LICENSE file for details. */ - -.apps--NotFound { - color: red; -} diff --git a/packages/apps/src/NotFound/index.tsx b/packages/apps/src/NotFound/index.tsx deleted file mode 100644 index 7f19bfbe9e..0000000000 --- a/packages/apps/src/NotFound/index.tsx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors -// This software may be modified and distributed under the terms -// of the ISC license. See the LICENSE file for details. - -import { I18nProps } from '@polkadot/ui-app/types'; - -import './NotFound.css'; - -import React from 'react'; - -import classes from '@polkadot/ui-app/util/classes'; - -import translate from '../translate'; - -type Props = I18nProps & {}; - -class NotFound extends React.PureComponent { - render () { - const { className, style, t } = this.props; - - return ( -
- {t('notfound.error', { - defaultValue: 'ERROR: You have tried to access an application that does not exist' - })} -
- ); - } -} - -export default translate(NotFound); diff --git a/packages/apps/src/SideBar/Item.tsx b/packages/apps/src/SideBar/Item.tsx index 135257ae6e..3bc9113868 100644 --- a/packages/apps/src/SideBar/Item.tsx +++ b/packages/apps/src/SideBar/Item.tsx @@ -20,15 +20,14 @@ type Props = I18nProps & { class Item extends React.PureComponent { render () { - const { route: { i18n, icon, isExact, name, path = '' }, t } = this.props; + const { route: { i18n, icon, name }, t } = this.props; return ( {t(`sidebar.${name}`, i18n)} diff --git a/packages/apps/src/routing/accounts.ts b/packages/apps/src/routing/accounts.ts index bcf2a3850f..7c6f892841 100644 --- a/packages/apps/src/routing/accounts.ts +++ b/packages/apps/src/routing/accounts.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Accounts' }, icon: 'users', - isExact: false, isHidden: false, name: 'accounts' } diff --git a/packages/apps/src/routing/addresses.ts b/packages/apps/src/routing/addresses.ts index a51e160d5e..8bf314e5a0 100644 --- a/packages/apps/src/routing/addresses.ts +++ b/packages/apps/src/routing/addresses.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Addresses' }, icon: 'address book', - isExact: false, isHidden: false, name: 'addresses' } diff --git a/packages/apps/src/routing/democracy.ts b/packages/apps/src/routing/democracy.ts index 7d5631aed9..a212e81196 100644 --- a/packages/apps/src/routing/democracy.ts +++ b/packages/apps/src/routing/democracy.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Democracy' }, icon: 'calendar check', - isExact: false, isHidden: false, name: 'democracy' } diff --git a/packages/apps/src/routing/example.ts b/packages/apps/src/routing/example.ts index ba8f836974..de7ee58653 100644 --- a/packages/apps/src/routing/example.ts +++ b/packages/apps/src/routing/example.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Example' }, icon: 'hand spock', - isExact: false, isHidden: true, name: 'example' } diff --git a/packages/apps/src/routing/explorer.ts b/packages/apps/src/routing/explorer.ts index b8dfeb7877..93d75ffa0f 100644 --- a/packages/apps/src/routing/explorer.ts +++ b/packages/apps/src/routing/explorer.ts @@ -13,9 +13,7 @@ export default ([ defaultValue: 'Explorer' }, icon: 'braille', - isExact: true, isHidden: false, - name: 'explorer', - path: '/' + name: 'explorer' } ] as Routes); diff --git a/packages/apps/src/routing/extrinsics.ts b/packages/apps/src/routing/extrinsics.ts index 68aefaa0eb..b7e4694b6a 100644 --- a/packages/apps/src/routing/extrinsics.ts +++ b/packages/apps/src/routing/extrinsics.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Extrinsics' }, icon: 'send', - isExact: false, isHidden: false, name: 'extrinsics' } diff --git a/packages/apps/src/routing/index.ts b/packages/apps/src/routing/index.ts index d9a90ba12c..f9f94419d1 100644 --- a/packages/apps/src/routing/index.ts +++ b/packages/apps/src/routing/index.ts @@ -16,7 +16,6 @@ import rpc from './rpc'; import staking from './staking'; import storage from './storage'; import toolbox from './toolbox'; -import unknown from './unknown'; import vanitygen from './vanitygen'; export default ({ @@ -36,6 +35,5 @@ export default ({ null, rpc, toolbox - ), - unknown + ) } as Routing); diff --git a/packages/apps/src/routing/rpc.ts b/packages/apps/src/routing/rpc.ts index 0b288abcdd..f5214420ef 100644 --- a/packages/apps/src/routing/rpc.ts +++ b/packages/apps/src/routing/rpc.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Raw RPC' }, icon: 'code', - isExact: false, isHidden: false, name: 'rpc' } diff --git a/packages/apps/src/routing/staking.ts b/packages/apps/src/routing/staking.ts index 6c70990804..415f0de9f2 100644 --- a/packages/apps/src/routing/staking.ts +++ b/packages/apps/src/routing/staking.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Staking' }, icon: 'certificate', - isExact: false, isHidden: false, name: 'staking' } diff --git a/packages/apps/src/routing/storage.ts b/packages/apps/src/routing/storage.ts index f273b11bb8..571cc6512d 100644 --- a/packages/apps/src/routing/storage.ts +++ b/packages/apps/src/routing/storage.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Storage' }, icon: 'database', - isExact: false, isHidden: false, name: 'storage' } diff --git a/packages/apps/src/routing/toolbox.ts b/packages/apps/src/routing/toolbox.ts index 294aba9373..6dc184d2ae 100644 --- a/packages/apps/src/routing/toolbox.ts +++ b/packages/apps/src/routing/toolbox.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Toolbox' }, icon: 'configure', - isExact: false, isHidden: false, name: 'toolbox' } diff --git a/packages/apps/src/routing/unknown.ts b/packages/apps/src/routing/unknown.ts deleted file mode 100644 index 597794c804..0000000000 --- a/packages/apps/src/routing/unknown.ts +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2017-2018 @polkadot/apps authors & contributors -// This software may be modified and distributed under the terms -// of the ISC license. See the LICENSE file for details. - -import { Route } from '../types'; - -import NotFound from '../NotFound'; - -export default ({ - Component: NotFound, - i18n: { - defaultValue: 'Not found' - }, - icon: 'warning circle', - isExact: false, - isHidden: true, - name: 'unknown' -} as Route); diff --git a/packages/apps/src/routing/vanitygen.ts b/packages/apps/src/routing/vanitygen.ts index 1214c0cc86..50e3436059 100644 --- a/packages/apps/src/routing/vanitygen.ts +++ b/packages/apps/src/routing/vanitygen.ts @@ -13,7 +13,6 @@ export default ([ defaultValue: 'Vanity' }, icon: 'hand lizard', - isExact: false, isHidden: false, name: 'vanitygen' } diff --git a/packages/apps/src/types.d.ts b/packages/apps/src/types.d.ts index 3b6d87f4d7..ec0f186bf0 100644 --- a/packages/apps/src/types.d.ts +++ b/packages/apps/src/types.d.ts @@ -5,20 +5,21 @@ import { SemanticICONS } from 'semantic-ui-react/dist/commonjs'; import { BareProps } from '@polkadot/ui-app/types'; +export type RouteProps = BareProps & { + basePath: string +} + export type Route = { - Component: React.ComponentType, + Component: React.ComponentType, i18n: any, // I18Next$Translate$Config, icon: SemanticICONS, - isExact: boolean, isHidden: boolean, - name: string, - path?: string + name: string }; export type Routes = Array; export type Routing = { default: string, - routes: Routes, - unknown: Route + routes: Routes } diff --git a/packages/ui-app/package.json b/packages/ui-app/package.json index 740be12b51..2de0d3af58 100644 --- a/packages/ui-app/package.json +++ b/packages/ui-app/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/ui-app", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -13,9 +13,9 @@ "@babel/runtime": "^7.0.0-rc.1", "@polkadot/extrinsics": "^0.28.14", "@polkadot/storage": "^0.28.14", - "@polkadot/ui-keyring": "^0.19.33", - "@polkadot/ui-react": "^0.19.33", - "@polkadot/ui-react-rx": "^0.19.33", + "@polkadot/ui-keyring": "^0.19.34", + "@polkadot/ui-react": "^0.19.34", + "@polkadot/ui-react-rx": "^0.19.34", "@types/chart.js": "^2.7.30", "@types/i18next-browser-languagedetector": "^2.0.1", "@types/i18next-xhr-backend": "^1.4.1", diff --git a/packages/ui-identicon/package.json b/packages/ui-identicon/package.json index 9df1510890..3d86efac3e 100644 --- a/packages/ui-identicon/package.json +++ b/packages/ui-identicon/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/ui-identicon", - "version": "0.19.33", + "version": "0.19.34", "description": "Renders an SVG picture representing an address", "main": "index.js", "scripts": { diff --git a/packages/ui-keyring/package.json b/packages/ui-keyring/package.json index 3edac37501..6780413cec 100644 --- a/packages/ui-keyring/package.json +++ b/packages/ui-keyring/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/ui-keyring", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,14 +9,9 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/ui-react": "^0.19.33", + "@polkadot/ui-react": "^0.19.34", "@polkadot/util-keyring": "^0.28.2", "store": "^2.0.12" }, diff --git a/packages/ui-react-rx/package.json b/packages/ui-react-rx/package.json index 3a4bdd4255..c254bd7cb8 100644 --- a/packages/ui-react-rx/package.json +++ b/packages/ui-react-rx/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/ui-react-rx", - "version": "0.19.33", + "version": "0.19.34", "description": "A collection of RxJs React components the Polkadot JS API", "main": "index.js", "keywords": [ @@ -29,11 +29,6 @@ "url": "https://github.com/polkadot-js/ui/issues" }, "homepage": "https://github.com/polkadot-js/ui/tree/master/packages/ui-react-rx#readme", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "eslint src && flow check", - "test": "echo \"Tests only available from root wrapper\"" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", "@polkadot/api-rx": "^0.28.14", diff --git a/packages/ui-react/package.json b/packages/ui-react/package.json index a48bb3dc4a..109bea3381 100644 --- a/packages/ui-react/package.json +++ b/packages/ui-react/package.json @@ -1,13 +1,8 @@ { "name": "@polkadot/ui-react", - "version": "0.19.33", + "version": "0.19.34", "description": "A collection of base React components", "main": "index.js", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "echo \"Tests only available from root wrapper\"" - }, "author": "Jaco Greeff ", "maintainers": [ "Jaco Greeff " @@ -16,7 +11,7 @@ "license": "ISC", "dependencies": { "@babel/runtime": "^7.0.0-rc.1", - "@polkadot/ui-identicon": "^0.19.33", + "@polkadot/ui-identicon": "^0.19.34", "polkadot-identicon": "^1.0.2" }, "devDependencies": { diff --git a/packages/ui-signer/package.json b/packages/ui-signer/package.json index a190492181..338b64a25f 100644 --- a/packages/ui-signer/package.json +++ b/packages/ui-signer/package.json @@ -1,6 +1,6 @@ { "name": "@polkadot/ui-signer", - "version": "0.19.33", + "version": "0.19.34", "main": "index.js", "repository": "https://github.com/polkadot-js/apps.git", "author": "Jaco Greeff ", @@ -9,16 +9,11 @@ ], "contributors": [], "license": "ISC", - "scripts": { - "build": "polkadot-dev-build-babel", - "check": "stylelint 'src/**/*.css' && eslint src && flow check", - "test": "jest --coverage" - }, "dependencies": { "@babel/runtime": "^7.0.0-rc.1", "@polkadot/extrinsics": "^0.28.14", - "@polkadot/ui-app": "^0.19.33", - "@polkadot/ui-keyring": "^0.19.33" + "@polkadot/ui-app": "^0.19.34", + "@polkadot/ui-keyring": "^0.19.34" }, "peerDependencies": { "react": "^16.4.1",