From 9e8709e4eb4da93afbd631a3f5d89c6dc4841576 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 28 Apr 2020 17:11:31 +0200 Subject: [PATCH] Justify modal columns (#2650) --- packages/apps/public/locales/en/app-democracy.json | 2 -- packages/apps/public/locales/en/app-staking.json | 6 +----- packages/apps/public/locales/en/translation.json | 9 +-------- packages/page-staking/src/Actions/Account/Nominate.tsx | 2 +- packages/page-staking/src/Targets/Nominate.tsx | 2 +- packages/react-components/src/Modal/Column.tsx | 6 +++--- packages/react-components/src/Modal/Columns.tsx | 5 +++++ packages/react-components/src/styles/index.ts | 2 +- 8 files changed, 13 insertions(+), 21 deletions(-) diff --git a/packages/apps/public/locales/en/app-democracy.json b/packages/apps/public/locales/en/app-democracy.json index 198c0a5aa8..b890f45261 100644 --- a/packages/apps/public/locales/en/app-democracy.json +++ b/packages/apps/public/locales/en/app-democracy.json @@ -35,13 +35,11 @@ "dispatch queue": "dispatch queue", "enact": "enact", "external": "external", - "failing": "failing", "imminent preimage (proposal already passed)": "imminent preimage (proposal already passed)", "launch period": "launch period", "locked": "locked", "locked balance": "locked balance", "nay": "nay", - "passing": "passing", "preimage hash": "preimage hash", "proposal hash": "proposal hash", "proposals": "proposals", diff --git a/packages/apps/public/locales/en/app-staking.json b/packages/apps/public/locales/en/app-staking.json index b830109426..e5ae87f1f6 100644 --- a/packages/apps/public/locales/en/app-staking.json +++ b/packages/apps/public/locales/en/app-staking.json @@ -10,7 +10,6 @@ "Bond more": "Bond more", "Bond more funds": "Bond more funds", "Bonding Preferences": "Bonding Preferences", - "Calculator": "Calculator", "Change controller account": "Change controller account", "Change reward destination": "Change reward destination", "Change session keys": "Change session keys", @@ -29,7 +28,6 @@ "New stake": "New stake", "No active validators found": "No active validators found", "No active validators to check": "No active validators to check", - "No active validators to check for rewards available": "No active validators to check for rewards available", "No funds staked yet. Bond funds to validate or nominate a validator": "No funds staked yet. Bond funds to validate or nominate a validator", "No pending era payouts from validators": "No pending era payouts from validators", "No pending payouts for your stashes": "No pending payouts for your stashes", @@ -41,7 +39,7 @@ "Nominations ({{count}})": "Nominations ({{count}})", "Nominators can be selected automatically based on the current on-chain conditions or supplied manually as selected from the list of all currently available validators. In both cases, your favorites appear for the selection.": "Nominators can be selected automatically based on the current on-chain conditions or supplied manually as selected from the list of all currently available validators. In both cases, your favorites appear for the selection.", "Once bonded, it wil need to be unlocked/withdrawn and will be locked for at least the bonding duration.": "Once bonded, it wil need to be unlocked/withdrawn and will be locked for at least the bonding duration.", - "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, then nominations will show as inactive.": "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, then nominations will show as inactive.", + "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.": "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.", "One of your available nomination accounts, keyed by the stash. The transaction will be sent from the controller.": "One of your available nomination accounts, keyed by the stash. The transaction will be sent from the controller.", "Parachains": "Parachains", "Payout": "Payout", @@ -66,8 +64,6 @@ "The amount of funds to unbond, this is adjusted using the bonded funds on the stash account.": "The amount of funds to unbond, this is adjusted using the bonded funds on the stash account.", "The amount placed at-stake should be no more that 95% of your available amount to protect against slashing events.": "The amount placed at-stake should be no more that 95% of your available amount to protect against slashing events.", "The amount that will be used on a per-validator basis to calculate profits for that validator.": "The amount that will be used on a per-validator basis to calculate profits for that validator.", - "The amount that will be used on a per-validator basis to calculate rewards for that validator.": "The amount that will be used on a per-validator basis to calculate rewards for that validator.", - "The auto-selection is done on the current profitability of the validators taking your favorites into account. It is adjusted based on the commission and current range of backing for teh validator. The calculation may and will change over time, so it is rather a selection based on the current state of the network, not a predictor of future profitability.": "The auto-selection is done on the current profitability of the validators taking your favorites into account. It is adjusted based on the commission and current range of backing for teh validator. The calculation may and will change over time, so it is rather a selection based on the current state of the network, not a predictor of future profitability.", "The auto-selection is done on the current profitability of the validators taking your favorites into account. It is adjusted based on the commission and current range of backing for the validator. The calculation may and will change over time, so it is rather a selection based on the current state of the network, not a predictor of future profitability.": "The auto-selection is done on the current profitability of the validators taking your favorites into account. It is adjusted based on the commission and current range of backing for the validator. The calculation may and will change over time, so it is rather a selection based on the current state of the network, not a predictor of future profitability.", "The bonding duration for any staked funds. Needs to be unlocked and withdrawn to become available.": "The bonding duration for any staked funds. Needs to be unlocked and withdrawn to become available.", "The controller is the account that is be used to control any nominating or validating actions. I will sign this transaction.": "The controller is the account that is be used to control any nominating or validating actions. I will sign this transaction.", diff --git a/packages/apps/public/locales/en/translation.json b/packages/apps/public/locales/en/translation.json index e6393630af..6bcedd7937 100644 --- a/packages/apps/public/locales/en/translation.json +++ b/packages/apps/public/locales/en/translation.json @@ -58,7 +58,6 @@ "Bond more": "", "Bond more funds": "", "Bonding Preferences": "", - "Calculator": "", "Call": "", "Call a contract": "", "Call a method on this contract": "", @@ -177,7 +176,6 @@ "Make Transfer": "", "Make recoverable": "", "Manage your connection to Ledger S": "", - "Max": "", "Message data": "", "Message origin.": "", "Messages": "", @@ -208,7 +206,6 @@ "No active referendums": "", "No active validators found": "", "No active validators to check": "", - "No active validators to check for rewards available": "", "No approved proposals": "", "No assets found.": "", "No bids": "", @@ -247,7 +244,7 @@ "None": "", "Nothing queued for execution": "", "Once bonded, it wil need to be unlocked/withdrawn and will be locked for at least the bonding duration.": "", - "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, then nominations will show as inactive.": "", + "Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.": "", "One of your available nomination accounts, keyed by the stash. The transaction will be sent from the controller.": "", "Override the default identity icon display with a specific theme": "", "Override the default ss58 prefix for address generation": "", @@ -410,10 +407,8 @@ "The amount that is associated with this vote. This value is is locked for the duration of the vote.": "", "The amount that will be allocated from the treasury pot": "", "The amount that will be used on a per-validator basis to calculate profits for that validator.": "", - "The amount that will be used on a per-validator basis to calculate rewards for that validator.": "", "The amount this total can be reduced by to change the referendum outcome. This assumes changes to the convictions of the existing votes, with no additional turnout.": "", "The amount this total should be increased by to change the referendum outcome. This assumes additional turnout with new votes at 1x conviction.": "", - "The auto-selection is done on the current profitability of the validators taking your favorites into account. It is adjusted based on the commission and current range of backing for teh validator. The calculation may and will change over time, so it is rather a selection based on the current state of the network, not a predictor of future profitability.": "", "The auto-selection is done on the current profitability of the validators taking your favorites into account. It is adjusted based on the commission and current range of backing for the validator. The calculation may and will change over time, so it is rather a selection based on the current state of the network, not a predictor of future profitability.": "", "The blake2b 256-bit hash of the actual input data.": "", "The bonding duration for any staked funds. Needs to be unlocked and withdrawn to become available.": "", @@ -665,7 +660,6 @@ "external": "", "extrinsic hash": "", "extrinsics": "", - "failing": "", "fee": "", "filter by name or tags": "", "filter by name, address or index": "", @@ -740,7 +734,6 @@ "parachain id": "", "parachains": "", "parent": "", - "passing": "", "password": "", "password (repeat)": "", "payment": "", diff --git a/packages/page-staking/src/Actions/Account/Nominate.tsx b/packages/page-staking/src/Actions/Account/Nominate.tsx index 7a815c2d85..18ffe2ea50 100644 --- a/packages/page-staking/src/Actions/Account/Nominate.tsx +++ b/packages/page-staking/src/Actions/Account/Nominate.tsx @@ -152,7 +152,7 @@ function Nominate ({ className, controllerId, next, nominating, onClose, stashId

{t('Nominators can be selected automatically based on the current on-chain conditions or supplied manually as selected from the list of all currently available validators. In both cases, your favorites appear for the selection.')}

-

{t('Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, then nominations will show as inactive.')}

+

{t('Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.')}

diff --git a/packages/page-staking/src/Targets/Nominate.tsx b/packages/page-staking/src/Targets/Nominate.tsx index f7ce9fd65d..120a199ed5 100644 --- a/packages/page-staking/src/Targets/Nominate.tsx +++ b/packages/page-staking/src/Targets/Nominate.tsx @@ -92,7 +92,7 @@ function Nominate ({ className, ownNominators, targets }: Props): React.ReactEle

{t('The selected validators to nominate, either via the "currently best algorithm" or via a manual selection.')}

-

{t('Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, then nominations will show as inactive.')}

+

{t('Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.')}

diff --git a/packages/react-components/src/Modal/Column.tsx b/packages/react-components/src/Modal/Column.tsx index 2336e3b1b9..cf3cd61849 100644 --- a/packages/react-components/src/Modal/Column.tsx +++ b/packages/react-components/src/Modal/Column.tsx @@ -21,20 +21,20 @@ export default React.memo(styled(Column)` &:nth-child(2) { display: none; flex: 0%; - font-size: 0.9rem; + font-size: 0.95rem; opacity: 0.75; } @media only screen and (min-width: 1024px) { &:nth-child(1), &:only-child { - flex: 0 66.6%; + flex: 0 66%; } &:nth-child(2) { box-sizing: border-box; display: block; - flex: 0 33.3%; + flex: 0 34%; padding-left: 1rem; } } diff --git a/packages/react-components/src/Modal/Columns.tsx b/packages/react-components/src/Modal/Columns.tsx index 6a6c573bea..5d402c76fe 100644 --- a/packages/react-components/src/Modal/Columns.tsx +++ b/packages/react-components/src/Modal/Columns.tsx @@ -16,4 +16,9 @@ function Columns ({ children, className }: ColumnProps): React.ReactElement` &.error, &.warning { - font-size: 0.9rem; + font-size: 0.95rem; margin-left: 2.25rem; padding: 0.75rem 1rem; }