From 68a523a778a87472215fb18cece664fa859cb8d2 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 8 Jul 2019 22:33:57 +0200 Subject: [PATCH] Beauty is in the eye of the beerholder (#1328) * Beuty is in the eye of the beerholder * Signer dialog * .multiple with address * Transfer wrapper * Multiple input height * 2rem -> 1.75rem * Adjustments for invalid * Break IdentityIcon out of box * Small layout adjustments * Row adjustment * Remove commented styles * Remove commented code * Remove unneeded padding * Remove unused i81n * Display messages with input-like styling * InputFile & Messages overrides * Adjust input margins (non-flex) * Center icon * Adjust labelExtra placement, staking dropdown * Combine linked lists into one * Fix developer settings --- packages/app-accounts/src/modals/Import.tsx | 2 +- packages/app-accounts/src/modals/Transfer.tsx | 14 +-- packages/app-contracts/src/ABI.tsx | 1 + packages/app-settings/src/Developer.tsx | 24 ++--- .../app-staking/src/Overview/CurrentList.tsx | 3 +- packages/ui-app/src/Dropdown.tsx | 4 +- packages/ui-app/src/InputAddress.tsx | 19 +++- packages/ui-app/src/InputFile.tsx | 29 +++++- packages/ui-app/src/Labelled.tsx | 97 +++++++++++++------ packages/ui-app/src/Messages.tsx | 14 ++- packages/ui-app/src/Params/Extrinsic.tsx | 13 +-- packages/ui-app/src/Row.tsx | 5 +- packages/ui-app/src/styles/app.css | 2 +- packages/ui-app/src/styles/components.css | 37 ++----- packages/ui-app/src/styles/semantic.css | 3 +- packages/ui-signer/src/index.css | 3 +- 16 files changed, 161 insertions(+), 109 deletions(-) diff --git a/packages/app-accounts/src/modals/Import.tsx b/packages/app-accounts/src/modals/Import.tsx index 7aebde9c86..3bf7df75c2 100644 --- a/packages/app-accounts/src/modals/Import.tsx +++ b/packages/app-accounts/src/modals/Import.tsx @@ -43,7 +43,7 @@ class Import extends TxComponent { dimmer='inverted' open > - {t('Add an account via seed')} + {t('Add via backup file')} {this.renderInput()} diff --git a/packages/app-accounts/src/modals/Transfer.tsx b/packages/app-accounts/src/modals/Transfer.tsx index 5612d2fb24..8017508f82 100644 --- a/packages/app-accounts/src/modals/Transfer.tsx +++ b/packages/app-accounts/src/modals/Transfer.tsx @@ -11,7 +11,7 @@ import BN from 'bn.js'; import React from 'react'; import styled from 'styled-components'; import { Index } from '@polkadot/types'; -import { Button, InputAddress, InputBalance, Modal, TxButton, media } from '@polkadot/ui-app'; +import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/ui-app'; import { Available } from '@polkadot/ui-reactive'; import Checks, { calcSignatureLength } from '@polkadot/ui-signer/Checks'; import { withApi, withCalls, withMulti } from '@polkadot/ui-api'; @@ -143,19 +143,19 @@ class Transfer extends React.PureComponent { help={t('The account you will send funds from.')} isDisabled={!!propSenderId} label={t('send from account')} + labelExtra={} onChange={this.onChangeFrom} type='account' /> -
} onChange={this.onChangeTo} type='allPlus' /> -
{ diff --git a/packages/app-settings/src/Developer.tsx b/packages/app-settings/src/Developer.tsx index 1c47e81572..5fcfaa44a3 100644 --- a/packages/app-settings/src/Developer.tsx +++ b/packages/app-settings/src/Developer.tsx @@ -8,7 +8,7 @@ import React from 'react'; import store from 'store'; import styled from 'styled-components'; import { getTypeRegistry } from '@polkadot/types'; -import { Button, Editor, InputFile, Labelled } from '@polkadot/ui-app'; +import { Button, Editor, InputFile } from '@polkadot/ui-app'; import { ActionStatus } from '@polkadot/ui-app/Status/types'; import { isJsonObject, stringToU8a, u8aToString } from '@polkadot/util'; @@ -59,7 +59,7 @@ class Developer extends React.PureComponent { clearContent={typesHasNoEntries && isTypesValid} help={t('Save the type definitions for your custom structures as key-value pairs in a valid JSON file. The key should be the name of your custom structure and the value an object containing your type definitions.')} isError={!isTypesValid} - label={t('Upload your additional type definitions as a JSON file')} + label={t('Additional types as a JSON file (or edit below)')} onChange={this.onChangeTypes} placeholder={typesPlaceholder} /> @@ -67,17 +67,12 @@ class Developer extends React.PureComponent {
- - - +
@@ -191,7 +186,8 @@ class Developer extends React.PureComponent { export default translate(styled(Developer)` .editor { - height: 300px; + height: 21rem; + margin-left: 2rem; position: relative; } `); diff --git a/packages/app-staking/src/Overview/CurrentList.tsx b/packages/app-staking/src/Overview/CurrentList.tsx index 373fd28e10..347113d53d 100644 --- a/packages/app-staking/src/Overview/CurrentList.tsx +++ b/packages/app-staking/src/Overview/CurrentList.tsx @@ -54,11 +54,10 @@ class CurrentList extends React.PureComponent {
diff --git a/packages/ui-app/src/Dropdown.tsx b/packages/ui-app/src/Dropdown.tsx index 1f00925ea5..9bd1b94793 100644 --- a/packages/ui-app/src/Dropdown.tsx +++ b/packages/ui-app/src/Dropdown.tsx @@ -22,6 +22,7 @@ type Props