Merge pull request #3692 from ethcore/jr-fixed-status

fix status bar to bottom of the screen
This commit is contained in:
Gav Wood 2016-12-01 01:09:29 +00:00 committed by GitHub
commit 9053e2f27b
3 changed files with 27 additions and 30 deletions

View File

@ -19,10 +19,17 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import { Snackbar as SnackbarMUI } from 'material-ui'; import { Snackbar as SnackbarMUI } from 'material-ui';
import { darkBlack } from 'material-ui/styles/colors'; import { darkBlack, grey800 } from 'material-ui/styles/colors';
import { closeSnackbar } from '../../../redux/providers/snackbarActions'; import { closeSnackbar } from '../../../redux/providers/snackbarActions';
const bodyStyle = {
backgroundColor: darkBlack,
borderStyle: 'solid',
borderColor: grey800,
borderWidth: '1px 1px 0 1px'
};
class Snackbar extends Component { class Snackbar extends Component {
static propTypes = { static propTypes = {
closeSnackbar: PropTypes.func.isRequired, closeSnackbar: PropTypes.func.isRequired,
@ -40,7 +47,7 @@ class Snackbar extends Component {
open={ open } open={ open }
message={ message } message={ message }
autoHideDuration={ cooldown } autoHideDuration={ cooldown }
bodyStyle={ { backgroundColor: darkBlack } } bodyStyle={ bodyStyle }
onRequestClose={ this.handleClose } onRequestClose={ this.handleClose }
/> />
); );

View File

@ -15,45 +15,46 @@
/* along with Parity. If not, see <http://www.gnu.org/licenses/>. /* along with Parity. If not, see <http://www.gnu.org/licenses/>.
*/ */
.status { .status {
padding: 0.5em; position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 1000;
display: flex;
align-items: center;
padding: .4em .5em;
font-size: x-small; font-size: x-small;
color: #ccc; color: #ccc;
background-color: rgba(0, 0, 0, 0.2) background-color: rgba(0, 0, 0, 0.8);
}
.title {
margin: 0 0.5em 0 2em;
} }
.enode { .enode {
word-wrap: break-word; word-wrap: break-word;
float: right;
} }
.enode > * { .enode > * {
display: inline-block; display: inline-block;
margin: 0.25em 0.5em; margin: 0 .25em;
vertical-align: top; vertical-align: middle;
} }
.enode > :last-child {
.block { margin-right: 0;
} }
.netinfo { .netinfo {
display: flex; display: flex;
flex-grow: 1;
align-items: center; align-items: center;
color: #ddd; color: #ddd;
} }
.netinfo > * { .netinfo > * {
display: inline-block;
margin-left: 1em; margin-left: 1em;
} }
.network { .network {
padding: 0.25em 0.5em; padding: 0.25em 0.5em;
display: inline-block; border-radius: .4em;
border-radius: 4px;
line-height: 1.2; line-height: 1.2;
text-transform: uppercase; text-transform: uppercase;
} }
@ -65,14 +66,3 @@
.networktest { .networktest {
background: rgb(136, 0, 0); background: rgb(136, 0, 0);
} }
.peers {
}
.version {
padding: 0.25em 0.5em;
float: left;
}
.syncing {
}

View File

@ -46,7 +46,6 @@ class Status extends Component {
<div className={ styles.version }> <div className={ styles.version }>
{ clientVersion } { clientVersion }
</div> </div>
{ this.renderEnode() }
<div className={ styles.netinfo }> <div className={ styles.netinfo }>
<BlockStatus /> <BlockStatus />
<div className={ netStyle }> <div className={ netStyle }>
@ -56,6 +55,7 @@ class Status extends Component {
{ netPeers.active.toFormat() }/{ netPeers.connected.toFormat() }/{ netPeers.max.toFormat() } peers { netPeers.active.toFormat() }/{ netPeers.connected.toFormat() }/{ netPeers.max.toFormat() } peers
</div> </div>
</div> </div>
{ this.renderEnode() }
</div> </div>
); );
} }
@ -73,7 +73,7 @@ class Status extends Component {
return ( return (
<div className={ styles.enode }> <div className={ styles.enode }>
<CopyToClipboard data={ enode } /> <CopyToClipboard data={ enode } size={ 12 } />
<div>{ abbreviated }</div> <div>{ abbreviated }</div>
</div> </div>
); );