Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fixed Snackbar not showing and/or behind transactions (#2730) #2731

Merged
merged 1 commit into from
Oct 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions js/src/views/Account/Header/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@
.uuidline {
display: inline-block;
}

.address {
white-space: nowrap;
font-family: monospace;
}
112 changes: 61 additions & 51 deletions js/src/views/Account/Header/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import CopyToClipboard from 'react-copy-to-clipboard';
import IconButton from 'material-ui/IconButton';
import Snackbar from 'material-ui/Snackbar';
import CopyIcon from 'material-ui/svg-icons/content/content-copy';
import { lightWhite, fullWhite, lightBlack } from 'material-ui/styles/colors';
import { lightWhite, fullWhite, darkBlack } from 'material-ui/styles/colors';

import { Balance, Container, ContainerTitle, IdentityIcon, IdentityName, Tags } from '../../../ui';

Expand Down Expand Up @@ -63,58 +63,68 @@ export default class Header extends Component {
: <div className={ styles.uuidline }>uuid: { uuid }</div>;

return (
<Container>
<IdentityIcon
address={ address } />
<div className={ styles.floatleft }>
<ContainerTitle title={ <IdentityName address={ address } unknown /> } />
<div className={ styles.addressline }>
<Snackbar
open={ addressCopied }
message={ `Address ${address} copied to clipboard` }
autoHideDuration={ 4000 }
onRequestClose={ this.handleCopyAddressClose }
bodyStyle={ {
backgroundColor: lightBlack
} }
/>
<CopyToClipboard
onCopy={ this.handleCopyAddress }
text={ address } >
<IconButton
tooltip='Copy address to clipboard'
tooltipPosition='top-center'
style={ {
width: 32,
height: 16,
padding: 0
} }
iconStyle={ {
width: 16,
height: 16
} }>
<CopyIcon
color={ addressCopied ? lightWhite : fullWhite }
/>
</IconButton>
</CopyToClipboard>
{ address }
<div>

<Snackbar
open={ addressCopied }
message={
<span>
Address
<span className={ styles.address }> { address } </span>
copied to clipboard
</span>
}
autoHideDuration={ 4000 }
onRequestClose={ this.handleCopyAddressClose }
bodyStyle={ {
backgroundColor: darkBlack
} }
/>

<Container>
<IdentityIcon
address={ address } />
<div className={ styles.floatleft }>
<ContainerTitle title={ <IdentityName address={ address } unknown /> } />
<div className={ styles.addressline }>
<CopyToClipboard
onCopy={ this.handleCopyAddress }
text={ address } >
<IconButton
tooltip='Copy address to clipboard'
tooltipPosition='top-center'
style={ {
width: 32,
height: 16,
padding: 0
} }
iconStyle={ {
width: 16,
height: 16
} }>
<CopyIcon
color={ addressCopied ? lightWhite : fullWhite }
/>
</IconButton>
</CopyToClipboard>
{ address }
</div>
{ uuidText }
<div className={ styles.infoline }>
{ meta.description }
</div>
{ this.renderTxCount() }
</div>
{ uuidText }
<div className={ styles.infoline }>
{ meta.description }
<div className={ styles.tags }>
<Tags tags={ meta.tags } />
</div>
{ this.renderTxCount() }
</div>
<div className={ styles.tags }>
<Tags tags={ meta.tags } />
</div>
<div className={ styles.balances }>
<Balance
account={ account }
balance={ balance } />
</div>
</Container>
<div className={ styles.balances }>
<Balance
account={ account }
balance={ balance } />
</div>
</Container>
</div>
);
}

Expand Down