From 4205907b7c43f429e6e89d70edb1b5b89369eff1 Mon Sep 17 00:00:00 2001 From: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com> Date: Fri, 12 Jul 2019 00:46:08 +0200 Subject: [PATCH] Fix for democracy overflow and signing (#1379) * unlock-signing-fix * overflow in referenda and motions * revert * sign fix bis * alphabetical order --- packages/app-toolbox/src/Sign.tsx | 75 +++++++++++++++++-------------- packages/ui-app/src/Row.tsx | 1 + 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/packages/app-toolbox/src/Sign.tsx b/packages/app-toolbox/src/Sign.tsx index 17d8b7e4f7..8a083809dd 100644 --- a/packages/app-toolbox/src/Sign.tsx +++ b/packages/app-toolbox/src/Sign.tsx @@ -2,19 +2,24 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { Button , Input, InputAddress, Output, Static } from '@polkadot/ui-app'; -import { I18nProps as Props } from '@polkadot/ui-app/types'; -import keyring from '@polkadot/ui-keyring'; +import { I18nProps } from '@polkadot/ui-app/types'; import { KeyringPair } from '@polkadot/keyring/types'; -import { hexToU8a, isHex, stringToU8a, u8aToHex } from '@polkadot/util'; -import React from 'react'; +import React from 'react'; import styled from 'styled-components'; +import { withMulti } from '@polkadot/ui-api'; +import { Button , Input, InputAddress, Output, Static } from '@polkadot/ui-app'; +import keyring from '@polkadot/ui-keyring'; +import { hexToU8a, isHex, stringToU8a, u8aToHex } from '@polkadot/util'; + import translate from './translate'; import Unlock from './Unlock'; +type Props = I18nProps & { + className?: string +}; + type State = { - className?: string, currentPair: KeyringPair | null, data: string, isHexData: boolean, @@ -45,7 +50,8 @@ class Sign extends React.PureComponent { } render () { - const { className, isLocked } = this.state; + const { className } = this.props; + const { isLocked } = this.state; return (
@@ -219,33 +225,36 @@ class Sign extends React.PureComponent { } } -export default translate(styled(Sign)` - position: relative; - width: 100%; - height: 100%; - - .unlock-overlay { - position: absolute; +export default withMulti( + styled(Sign)` + position: relative; width: 100%; height: 100%; - top:0; - left:0; - background-color: #0f0e0e7a; - } - .unlock-overlay-warning { - display: flex; - align-items: center; - justify-content: center; - height:100%; - } - - .unlock-overlay-content { - color:#fff; - text-align:center; - - .ui--Button-Group { - text-align: center; + .unlock-overlay { + position: absolute; + width: 100%; + height: 100%; + top:0; + left:0; + background-color: #0f0e0e7a; } - } -`); + + .unlock-overlay-warning { + display: flex; + align-items: center; + justify-content: center; + height:100%; + } + + .unlock-overlay-content { + color:#fff; + text-align:center; + + .ui--Button-Group { + text-align: center; + } + } + `, + translate +); diff --git a/packages/ui-app/src/Row.tsx b/packages/ui-app/src/Row.tsx index b1f6e5e374..33cdcdc055 100644 --- a/packages/ui-app/src/Row.tsx +++ b/packages/ui-app/src/Row.tsx @@ -105,6 +105,7 @@ export const styles = ` margin-right: 1rem; padding: 0.25rem 0 0; width: 100%; + min-width: 0; .account-label{ margin: -0.75rem 0 0 0