mirror of
https://github.com/pezkuwichain/pezkuwi-ui.git
synced 2026-05-31 05:11:04 +00:00
Short address length, uppercase option (#121)
* Short address length, uppercase option * Update CHANGELOG
This commit is contained in:
+3
-1
@@ -1,8 +1,10 @@
|
||||
# 0.38.1
|
||||
|
||||
- Sorting of keyring addresses
|
||||
- Fix JSON import defaults
|
||||
- Fix JSON import defaults (previously detection was not working for old accounts)
|
||||
- Display icons using publicKey (not the encoded address)
|
||||
- Ensure only a single instance of ui-keyring is loaded
|
||||
- Adjust short address option display (keyring options)
|
||||
|
||||
# 0.37.1
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.4.4",
|
||||
"@babel/runtime": "^7.4.4",
|
||||
"@polkadot/dev-react": "^0.30.0-beta.3",
|
||||
"@polkadot/dev-react": "^0.30.0-beta.4",
|
||||
"@polkadot/ts": "^0.1.56",
|
||||
"empty": "^0.10.1",
|
||||
"gh-pages": "^2.0.1"
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
"react": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.90.0-beta.1",
|
||||
"@polkadot/util-crypto": "^0.90.0-beta.1",
|
||||
"@polkadot/keyring": "^0.90.0-beta.4",
|
||||
"@polkadot/util-crypto": "^0.90.0-beta.4",
|
||||
"xmlserializer": "^0.6.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
"styled-components": "^4.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^0.90.0-beta.1",
|
||||
"@polkadot/types": "^0.78.0-beta.1",
|
||||
"@polkadot/util": "^0.90.0-beta.1"
|
||||
"@polkadot/keyring": "^0.90.0-beta.4",
|
||||
"@polkadot/types": "^0.78.0-beta.13",
|
||||
"@polkadot/util": "^0.90.0-beta.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/keyring": "*",
|
||||
|
||||
@@ -9,6 +9,7 @@ import IdentityIcon from '@polkadot/ui-identicon';
|
||||
type Props = {
|
||||
address: string,
|
||||
className?: string,
|
||||
isUppercase: boolean,
|
||||
name: string,
|
||||
style?: {
|
||||
[index: string]: string
|
||||
@@ -44,14 +45,17 @@ const Wrapper = styled.div`
|
||||
flex: 1 0;
|
||||
margin-left: 3rem;
|
||||
overflow: hidden;
|
||||
text-transform: uppercase;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
&.uppercase {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default class KeyPair extends React.PureComponent<Props> {
|
||||
render () {
|
||||
const { address, className, name, style } = this.props;
|
||||
const { address, className, isUppercase, name, style } = this.props;
|
||||
|
||||
return (
|
||||
<Wrapper
|
||||
@@ -63,7 +67,7 @@ export default class KeyPair extends React.PureComponent<Props> {
|
||||
size={32}
|
||||
value={address}
|
||||
/>
|
||||
<div className='name'>
|
||||
<div className={`name ${isUppercase ? 'uppercase' : 'normalcase'}`}>
|
||||
{name}
|
||||
</div>
|
||||
<div className='address'>
|
||||
|
||||
@@ -9,11 +9,11 @@ import { isUndefined } from '@polkadot/util';
|
||||
|
||||
import KeyPair from './KeyPair';
|
||||
|
||||
export default function createItem (address: string, _name?: string): KeyringSectionOption {
|
||||
export default function createItem (address: string, _name?: string, isUppercase: boolean = true): KeyringSectionOption {
|
||||
const name = isUndefined(_name)
|
||||
? (
|
||||
(address.length > 15)
|
||||
? `${address.slice(0, 7)}…${address.slice(-7)}`
|
||||
? `${address.slice(0, 6)}…${address.slice(-6)}`
|
||||
: address
|
||||
)
|
||||
: _name;
|
||||
@@ -24,6 +24,7 @@ export default function createItem (address: string, _name?: string): KeyringSec
|
||||
text: (
|
||||
<KeyPair
|
||||
address={address}
|
||||
isUppercase={isUppercase}
|
||||
name={name}
|
||||
/>
|
||||
),
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"store": "^2.0.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/util": "^0.90.0-beta.1"
|
||||
"@polkadot/util": "^0.90.0-beta.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/util": "*"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"@babel/runtime": "^7.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "^0.78.0-beta.1"
|
||||
"@polkadot/types": "^0.78.0-beta.13"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@polkadot/types": "*"
|
||||
|
||||
@@ -1765,15 +1765,15 @@
|
||||
universal-user-agent "^2.0.0"
|
||||
url-template "^2.0.8"
|
||||
|
||||
"@polkadot/dev-react@^0.30.0-beta.3":
|
||||
version "0.30.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/dev-react/-/dev-react-0.30.0-beta.3.tgz#68f1ef50bb67caef02fc9de983659e0c3018f10f"
|
||||
integrity sha512-hghhdSf+mLeXmIJgBGrSzgu4zVQTJ5QrFoAl8QjzBuvNHErrVvtQ7FtDi3gZCcEaOaHa3sSApgh3HTesHD0bIg==
|
||||
"@polkadot/dev-react@^0.30.0-beta.4":
|
||||
version "0.30.0-beta.4"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/dev-react/-/dev-react-0.30.0-beta.4.tgz#72c18b482a39c37d7d488ff353382c6a40ee148f"
|
||||
integrity sha512-DCna2LmQXpfmvWMMB0tQCKJM2P0D5qtQR7AcbMS1sqf+kieJT1F+++5t64fcJYwENYZ1oJrAW5bHhsuBvfzIGA==
|
||||
dependencies:
|
||||
"@babel/core" "^7.4.4"
|
||||
"@babel/plugin-syntax-dynamic-import" "^7.2.0"
|
||||
"@babel/preset-react" "^7.0.0"
|
||||
"@polkadot/dev" "^0.30.0-beta.3"
|
||||
"@polkadot/dev" "^0.30.0-beta.4"
|
||||
"@types/react" "^16.8.14"
|
||||
"@types/react-dom" "^16.8.4"
|
||||
"@types/styled-components" "4.1.8"
|
||||
@@ -1801,10 +1801,10 @@
|
||||
webpack-plugin-serve "^0.8.0"
|
||||
worker-loader "^2.0.0"
|
||||
|
||||
"@polkadot/dev@^0.30.0-beta.3":
|
||||
version "0.30.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.30.0-beta.3.tgz#22ed6cfa735520f75e43020cf6673ec4d376ee48"
|
||||
integrity sha512-mb4d+OJfWRx/pmsOKH29rRUq0Htoxl8MdIufnbikIW9aTROK5yULhkeB7SUKuYglVFhr+z1HGDx7MYBzDqjrhA==
|
||||
"@polkadot/dev@^0.30.0-beta.4":
|
||||
version "0.30.0-beta.4"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.30.0-beta.4.tgz#10403838cba964a21d2cc6740fdb74c9b9244038"
|
||||
integrity sha512-ugJkBxvGOebSQQSL+zhIPAHUdnNxy5qGSUPnSh+7ss5g2rYzf6zIpUIlAJ78heF+vmTebD+6VmjwW9jQ7XbnCA==
|
||||
dependencies:
|
||||
"@babel/cli" "^7.4.4"
|
||||
"@babel/core" "^7.4.4"
|
||||
@@ -1838,14 +1838,14 @@
|
||||
typescript "^3.4.5"
|
||||
vuepress "^1.0.0-alpha.47"
|
||||
|
||||
"@polkadot/keyring@^0.90.0-beta.1":
|
||||
version "0.90.0-beta.1"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.90.0-beta.1.tgz#e6220c837c0acb79c4a1a82974cb911736cfca4e"
|
||||
integrity sha512-Mt3GeBb4+F3uLSY3Cgt3pY9C1AdyDJxcfcig2am1zIRTdOXPk4tadIWOAFfLHCGw4w7Sv8vo9+Kb061/5vv4EA==
|
||||
"@polkadot/keyring@^0.90.0-beta.4":
|
||||
version "0.90.0-beta.4"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-0.90.0-beta.4.tgz#3b3ada2e1945025aeca5acf345b0023965682dc8"
|
||||
integrity sha512-t3NEC2hIJri5metrTXOQpoKjpnuL+RIe7uAFhlXByaMgS+92bEPkcFamuza91L8bVxJvCxbhYWNl0P6hnv+7lw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/util" "^0.90.0-beta.1"
|
||||
"@polkadot/util-crypto" "^0.90.0-beta.1"
|
||||
"@polkadot/util" "^0.90.0-beta.4"
|
||||
"@polkadot/util-crypto" "^0.90.0-beta.4"
|
||||
"@types/bs58" "^4.0.0"
|
||||
bs58 "^4.0.1"
|
||||
|
||||
@@ -1854,22 +1854,22 @@
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/ts/-/ts-0.1.56.tgz#ffd6e9c95704a7fb90b918193b9dc5c440114b27"
|
||||
integrity sha512-wnt4zXxZXyz6WaubTO/I+nUElwV2DogFzdl6CrKfVn2PTWp8uHN06W9s40FH57ORtmQfDr9rLRP8Nq+oIyElbg==
|
||||
|
||||
"@polkadot/types@^0.78.0-beta.1":
|
||||
version "0.78.0-beta.1"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.78.0-beta.1.tgz#f1fc4324487cdf7d9448994c73062b6210529551"
|
||||
integrity sha512-vXFeuNB+gAgrkmfEv3d+otDASnu+sKB36fVPSImtBxczTemiMN+3AkVPXb7lBC0x9E7bCnm9p7WlYgj0Z/n9zw==
|
||||
"@polkadot/types@^0.78.0-beta.13":
|
||||
version "0.78.0-beta.13"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-0.78.0-beta.13.tgz#9d0df1b57b9b6455f5c2a4f9fce605ee1455fc20"
|
||||
integrity sha512-2y0eIggWoijQUbUHitt3SBxYOIIqENxaQrYehijcOtgcoz48mkIXNPL9ETI7tsFCLK313Wts+Y4tGXqKJwX8qA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/keyring" "^0.90.0-beta.1"
|
||||
"@polkadot/util" "^0.90.0-beta.1"
|
||||
"@polkadot/keyring" "^0.90.0-beta.4"
|
||||
"@polkadot/util" "^0.90.0-beta.4"
|
||||
|
||||
"@polkadot/util-crypto@^0.90.0-beta.1":
|
||||
version "0.90.0-beta.1"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.90.0-beta.1.tgz#e826c5b6dd315418ba9f5789492c81b69ec43bd0"
|
||||
integrity sha512-Chl7y4FzJMoFNmTlBC1Uvos1qReWS5ZdV24DcAG15g5GCKsQRSyYX1fU0nudXTxBAIROmEr28pHdihQn4HTdfg==
|
||||
"@polkadot/util-crypto@^0.90.0-beta.4":
|
||||
version "0.90.0-beta.4"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-0.90.0-beta.4.tgz#a4ceb7003836b87c50d65009d09e3fb9b94fb9ab"
|
||||
integrity sha512-lxtnbKgIVP84I9g3NlNx52+YoqlmEvmWr48nxHuTQEsoNt348GwSwGlIv4laMXJ+WP2PSAqSvWtJbK8L7a4gpA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@polkadot/util" "^0.90.0-beta.1"
|
||||
"@polkadot/util" "^0.90.0-beta.4"
|
||||
"@polkadot/wasm-crypto" "^0.9.1"
|
||||
"@types/bip39" "^2.4.2"
|
||||
"@types/pbkdf2" "^3.0.0"
|
||||
@@ -1883,10 +1883,10 @@
|
||||
tweetnacl "^1.0.1"
|
||||
xxhashjs "^0.2.2"
|
||||
|
||||
"@polkadot/util@^0.90.0-beta.1":
|
||||
version "0.90.0-beta.1"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.90.0-beta.1.tgz#e70c5120f1fb20e9c78983598dc6e17030ab7550"
|
||||
integrity sha512-gRF6DWq/PVtD4EnVxyta8tuiAG2j3mvP88xcyMcWDqENZfw43Rnor+bT9YhsZ0AkLuad4KbPOw3cWbVnBPIoIg==
|
||||
"@polkadot/util@^0.90.0-beta.4":
|
||||
version "0.90.0-beta.4"
|
||||
resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-0.90.0-beta.4.tgz#b682e67216cb5b4145dec3a9a082df4f8a10d0b2"
|
||||
integrity sha512-8zAFLjPvOgryfRTs7BWr+ITyj4FQmWBwPMoKvw4sbGw8KxzcOegXIoi5rLW9VtSq7UqCKE6wi8s1lYF5PDnBbA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.4.4"
|
||||
"@types/bn.js" "^4.11.5"
|
||||
|
||||
Reference in New Issue
Block a user