From 584ce1e5bcfc30d3ac26dd40ca93232f1240d334 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 4 Sep 2020 12:27:09 +0200 Subject: [PATCH] Tiny UI adjustments (#3608) --- CHANGELOG.md | 26 ++++++++++++++++++- packages/react-components/src/AddressInfo.tsx | 13 +++++----- packages/react-components/src/Table/Body.tsx | 2 +- packages/react-components/src/styles/index.ts | 6 +++++ 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb54e8dd00..e5e1bf4a03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # CHANGELOG +## 0.57-beta.x + +Contributed: + +- Add Crust network (Thanks to https://github.com/zikunfan) +- i18n Chinese round-out (Thanks to Polkaworld) +- i18n Italian (Thanks to https://github.com/fomod-in) +- Initial i18n Italian (Thanks to https://github.com/excerebrose) +- i18n Bahasa Indonesian updates (Thanks to https://github.com/nzjourney) +- Ad per-block/end-block vesting info (thanks to https://github.com/niklabh) +- Update Polkastats logo (https://github.com/mariopino) +- Fixes for i18n translation page on swapping (Thanks to https://github.com/motinados) + +Changes: + +- Add individual era-slash cancels on staking sleashes page +- Add "copy seed" button to align with the extension UX on new accounts +- Combine confirmation/backup of imports/new account into the modals (no double-modal) +- Fix ecdsa JSON import dialogs +- Fix detection of old/new proxy chains based on args to support Kusama 2023 +- Ensure all network-related configs are maintainable +- Adjust average calcs for targets (optimization) + + ## 0.56.1 Aug 31, 2020 Contributed: @@ -10,7 +34,7 @@ Contributed: - Add Phala POC2 testnet (Thanks to https://github.com/krhougs) - Add Plasm network (Thanks to https://github.com/akru) - Rename Darwinia Crab chain (Thanks to https://github.com/WoeOm) -- Add I18n For Bahasa Indonesian (Thanks to https://github.com/nzjourney) +- Add I18n for Bahasa Indonesian (Thanks to https://github.com/nzjourney) Changes: diff --git a/packages/react-components/src/AddressInfo.tsx b/packages/react-components/src/AddressInfo.tsx index bdec091db8..92c6f45ed4 100644 --- a/packages/react-components/src/AddressInfo.tsx +++ b/packages/react-components/src/AddressInfo.tsx @@ -7,6 +7,7 @@ import { BlockNumber, LockIdentifier, ValidatorPrefsTo145 } from '@polkadot/type import BN from 'bn.js'; import React from 'react'; +import { TFunction } from 'i18next'; import styled from 'styled-components'; import { BN_ZERO, formatBalance, formatNumber, hexToString, isObject } from '@polkadot/util'; import { Expander, Icon, Tooltip } from '@polkadot/react-components'; @@ -143,7 +144,7 @@ function calcBonded (stakingInfo?: DeriveStakingAccount, bonded?: boolean | BN[] return [own, other]; } -function renderExtended ({ address, balancesAll, withExtended }: Props, t: (key: string) => T): React.ReactNode { +function renderExtended ({ address, balancesAll, withExtended }: Props, t: TFunction): React.ReactNode { const extendedDisplay = withExtended === true ? DEFAULT_EXTENDED : withExtended || undefined; @@ -173,7 +174,7 @@ function renderExtended ({ address, balancesAll, withExtended }: Props, t: (key: string) => T): React.ReactNode { +function renderValidatorPrefs ({ stakingInfo, withValidatorPrefs = false }: Props, t: TFunction): React.ReactNode { const validatorPrefsDisplay = withValidatorPrefs === true ? DEFAULT_PREFS : withValidatorPrefs; @@ -215,7 +216,7 @@ function renderValidatorPrefs ({ stakingInfo, withValidatorPrefs = false }: Prop ); } -function renderBalances (props: Props, allAccounts: string[], bestNumber: BlockNumber | undefined, t: (key: string) => T): React.ReactNode { +function renderBalances (props: Props, allAccounts: string[], bestNumber: BlockNumber | undefined, t: TFunction): React.ReactNode { const { address, balancesAll, democracyLocks, stakingInfo, withBalance = true, withBalanceToggle = false } = props; const balanceDisplay = withBalance === true ? DEFAULT_BALANCES @@ -272,12 +273,10 @@ function renderBalances (props: Props, allAccounts: string[], bestNumber: BlockN
{formatBalance(balancesAll.vestedClaimable, { forceUnit: '-' })}
{t('available to be unlocked')}
+ +
{t('until block')} {formatNumber(balancesAll.vestingEndBlock)}
{formatBalance(balancesAll.vestingPerBlock)}
{t('per block')}
-
- {`${t('until block')} ${formatNumber(balancesAll.vestingEndBlock)}`} - -
} trigger={`${address}-vested-trigger`} diff --git a/packages/react-components/src/Table/Body.tsx b/packages/react-components/src/Table/Body.tsx index 36e4093ceb..0e4d5cc01a 100644 --- a/packages/react-components/src/Table/Body.tsx +++ b/packages/react-components/src/Table/Body.tsx @@ -190,7 +190,7 @@ export default React.memo(styled(Body)` background: transparent; } - .ui--Button:not(.isIcon):not(.isToplevel):not(:hover) { + .ui--Button:not(.isIcon):not(:hover) { background: transparent !important; box-shadow: none !important; } diff --git a/packages/react-components/src/styles/index.ts b/packages/react-components/src/styles/index.ts index 6f39f08f2b..16eb57f626 100644 --- a/packages/react-components/src/styles/index.ts +++ b/packages/react-components/src/styles/index.ts @@ -135,6 +135,12 @@ export default createGlobalStyle` .ui--Table td .ui--Button { &:not(.isDisabled):not(.isIcon):not(.isToplevel), &.withoutLink:not(.isDisabled) { + &:hover { + .ui--Icon { + color: #f5f5f4; + } + } + .ui--Icon { background: transparent; color: ${getHighlight};