Fix down-scale behavior
This commit is contained in:
@@ -15,6 +15,9 @@ const styles: StyleRulesCallback = theme => ({
|
|||||||
color: theme.palette.primary.contrastText,
|
color: theme.palette.primary.contrastText,
|
||||||
verticalAlign: 'middle' as 'middle',
|
verticalAlign: 'middle' as 'middle',
|
||||||
},
|
},
|
||||||
|
bufferStats: {
|
||||||
|
minWidth: '8em',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -39,7 +42,7 @@ class PauseButton extends React.Component<Props, {changes: number}> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span>
|
<span className={this.props.classes.bufferStats}>
|
||||||
{this.state.changes} changes<br />
|
{this.state.changes} changes<br />
|
||||||
buffer at {Math.round(this.props.tree.unmergedChanges().fillState() * 10000) / 100}%
|
buffer at {Math.round(this.props.tree.unmergedChanges().fillState() * 10000) / 100}%
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -23,9 +23,10 @@ import PauseButton from './PauseButton'
|
|||||||
const styles: StyleRulesCallback = theme => ({
|
const styles: StyleRulesCallback = theme => ({
|
||||||
title: {
|
title: {
|
||||||
display: 'none',
|
display: 'none',
|
||||||
[theme.breakpoints.up('sm')]: {
|
[theme.breakpoints.up(750)]: {
|
||||||
display: 'block',
|
display: 'block',
|
||||||
},
|
},
|
||||||
|
whiteSpace: 'nowrap' as 'nowrap',
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
@@ -36,14 +37,29 @@ const styles: StyleRulesCallback = theme => ({
|
|||||||
},
|
},
|
||||||
marginRight: theme.spacing(2),
|
marginRight: theme.spacing(2),
|
||||||
marginLeft: 0,
|
marginLeft: 0,
|
||||||
width: '100%',
|
flexGrow: 1,
|
||||||
[theme.breakpoints.up('sm')]: {
|
maxWidth: '60%',
|
||||||
marginLeft: theme.spacing(3),
|
|
||||||
|
[theme.breakpoints.up('md')]: {
|
||||||
|
maxWidth: '30%',
|
||||||
|
|
||||||
|
marginLeft: theme.spacing(4),
|
||||||
|
width: 'auto',
|
||||||
|
},
|
||||||
|
[theme.breakpoints.up(750)]: {
|
||||||
|
marginLeft: theme.spacing(4),
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
disconnectIcon: {
|
||||||
|
[theme.breakpoints.down('xs')]: {
|
||||||
|
display: 'none' as 'none',
|
||||||
|
},
|
||||||
|
marginRight: '8px',
|
||||||
|
paddingLeft: '8px',
|
||||||
|
},
|
||||||
searchIcon: {
|
searchIcon: {
|
||||||
width: theme.spacing(8),
|
width: theme.spacing(6),
|
||||||
height: '100%',
|
height: '100%',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
pointerEvents: 'none',
|
pointerEvents: 'none',
|
||||||
@@ -59,7 +75,7 @@ const styles: StyleRulesCallback = theme => ({
|
|||||||
paddingTop: theme.spacing(1),
|
paddingTop: theme.spacing(1),
|
||||||
paddingRight: theme.spacing(1),
|
paddingRight: theme.spacing(1),
|
||||||
paddingBottom: theme.spacing(1),
|
paddingBottom: theme.spacing(1),
|
||||||
paddingLeft: theme.spacing(10),
|
paddingLeft: theme.spacing(6),
|
||||||
transition: theme.transitions.create('width'),
|
transition: theme.transitions.create('width'),
|
||||||
width: '100%',
|
width: '100%',
|
||||||
[theme.breakpoints.up('md')]: {
|
[theme.breakpoints.up('md')]: {
|
||||||
@@ -132,7 +148,7 @@ class TitleBar extends React.Component<Props, {}> {
|
|||||||
{this.renderSearch()}
|
{this.renderSearch()}
|
||||||
<PauseButton />
|
<PauseButton />
|
||||||
<Button className={classes.disconnect} onClick={actions.connection.disconnect}>
|
<Button className={classes.disconnect} onClick={actions.connection.disconnect}>
|
||||||
Disconnect <CloudOff style={{ marginRight: '8px', paddingLeft: '8px' }}/>
|
Disconnect <CloudOff className={classes.disconnectIcon} />
|
||||||
</Button>
|
</Button>
|
||||||
<ConnectionHealthIndicator withBackground={true} />
|
<ConnectionHealthIndicator withBackground={true} />
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|||||||
Reference in New Issue
Block a user