From ac86d3ec2100a92f9c346d1bd4fdbef1a7e2eb71 Mon Sep 17 00:00:00 2001 From: apanizo Date: Fri, 31 Aug 2018 12:36:37 +0200 Subject: [PATCH] Added Icons to user's account information --- src/components/Header/assets/connected.svg | 6 ++ src/components/Header/assets/dotRinkeby.svg | 3 + src/components/Header/assets/gnosis_logo.svg | 49 ------------- .../Header/assets/icon_metamask.svg | 20 ------ src/components/Header/assets/icon_parity.svg | 72 ------------------- src/components/Header/assets/metamask.svg | 3 + .../Header/component/UserDetails/Details.jsx | 40 ----------- .../Header/component/UserDetails/index.jsx | 15 +++- 8 files changed, 25 insertions(+), 183 deletions(-) create mode 100644 src/components/Header/assets/connected.svg create mode 100644 src/components/Header/assets/dotRinkeby.svg delete mode 100644 src/components/Header/assets/gnosis_logo.svg delete mode 100644 src/components/Header/assets/icon_metamask.svg delete mode 100644 src/components/Header/assets/icon_parity.svg create mode 100644 src/components/Header/assets/metamask.svg delete mode 100644 src/components/Header/component/UserDetails/Details.jsx diff --git a/src/components/Header/assets/connected.svg b/src/components/Header/assets/connected.svg new file mode 100644 index 00000000..1309cf1c --- /dev/null +++ b/src/components/Header/assets/connected.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/Header/assets/dotRinkeby.svg b/src/components/Header/assets/dotRinkeby.svg new file mode 100644 index 00000000..8b415e70 --- /dev/null +++ b/src/components/Header/assets/dotRinkeby.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Header/assets/gnosis_logo.svg b/src/components/Header/assets/gnosis_logo.svg deleted file mode 100644 index 32b13cfd..00000000 --- a/src/components/Header/assets/gnosis_logo.svg +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/Header/assets/icon_metamask.svg b/src/components/Header/assets/icon_metamask.svg deleted file mode 100644 index 7a96204f..00000000 --- a/src/components/Header/assets/icon_metamask.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/components/Header/assets/icon_parity.svg b/src/components/Header/assets/icon_parity.svg deleted file mode 100644 index 63da56db..00000000 --- a/src/components/Header/assets/icon_parity.svg +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - diff --git a/src/components/Header/assets/metamask.svg b/src/components/Header/assets/metamask.svg new file mode 100644 index 00000000..5c45d278 --- /dev/null +++ b/src/components/Header/assets/metamask.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/Header/component/UserDetails/Details.jsx b/src/components/Header/component/UserDetails/Details.jsx deleted file mode 100644 index b8bc3932..00000000 --- a/src/components/Header/component/UserDetails/Details.jsx +++ /dev/null @@ -1,40 +0,0 @@ -// @flow -import * as React from 'react' -import Col from '~/components/layout/Col' -import Bold from '~/components/layout/Bold' -import Paragraph from '~/components/layout/Paragraph' - -type Props = { - provider: string, - network: string, - connected: boolean, -} - -const leftColumnStyle = { - maxWidth: '80px', -} - -const paragraphStyle = { - margin: '2px', -} - -const Details = ({ provider, network, connected }: Props) => { - const status = connected ? 'Connected' : 'Not connected' - - return ( - - - Status: - Client: - Network: - - - {status} - {provider} - {network} - - - ) -} - -export default Details diff --git a/src/components/Header/component/UserDetails/index.jsx b/src/components/Header/component/UserDetails/index.jsx index f334abe3..f9d77270 100644 --- a/src/components/Header/component/UserDetails/index.jsx +++ b/src/components/Header/component/UserDetails/index.jsx @@ -8,11 +8,16 @@ import List from '@material-ui/core/List' import Identicon from '~/components/Identicon' import Bold from '~/components/layout/Bold' import Hairline from '~/components/layout/Hairline' +import Img from '~/components/layout/Img' import Row from '~/components/layout/Row' import Spacer from '~/components/Spacer' -import { md, lg, background } from '~/theme/variables' +import { sm, md, lg, background } from '~/theme/variables' import { upperFirst } from '~/utils/css' +const metamask = require('../../assets/metamask.svg') +const connectedLogo = require('../../assets/connected.svg') +const dot = require('../../assets/dotRinkeby.svg') + type Props = { provider: string, connected: boolean, @@ -42,7 +47,7 @@ const styles = () => ({ user: { alignItems: 'center', backgroundColor: background, - padding: md, + padding: sm, }, details: { padding: `0 ${lg}`, @@ -56,6 +61,9 @@ const styles = () => ({ disconnect: { padding: `${md} 32px`, }, + logo: { + margin: '0px 2px', + }, }) const UserDetails = ({ @@ -78,6 +86,7 @@ const UserDetails = ({ Status + Status connected {status} @@ -88,6 +97,7 @@ const UserDetails = ({ Client + Metamask client {upperFirst(provider)} @@ -98,6 +108,7 @@ const UserDetails = ({ Netowrk + Network {upperFirst(network)}