mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 01:26:48 +03:00
Show monitor when isVisible is true
This commit is contained in:
parent
2a103c005a
commit
daf029fca2
|
@ -17,7 +17,6 @@ export function getDefaultStyle(props) {
|
||||||
opacity: 0.92,
|
opacity: 0.92,
|
||||||
background: 'black',
|
background: 'black',
|
||||||
color: 'white',
|
color: 'white',
|
||||||
padding: '1em',
|
|
||||||
left: left ? 0 : undefined,
|
left: left ? 0 : undefined,
|
||||||
right: right ? 0 : undefined,
|
right: right ? 0 : undefined,
|
||||||
top: top ? 0 : undefined,
|
top: top ? 0 : undefined,
|
||||||
|
|
|
@ -105,47 +105,59 @@ export default class LogMonitor {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
if (this.props.monitorState.isVisible === true) {
|
||||||
<div style={{
|
return (
|
||||||
fontFamily: 'monospace',
|
<div style={{
|
||||||
position: 'relative'
|
fontFamily: 'monospace',
|
||||||
}}>
|
position: 'relative',
|
||||||
<div>
|
padding: '1rem'
|
||||||
<a onClick={::this.handleReset}
|
}}>
|
||||||
style={{ textDecoration: 'underline', cursor: 'hand' }}>
|
<div>
|
||||||
Reset
|
<div style={{
|
||||||
</a>
|
paddingBottom: '.5rem'
|
||||||
</div>
|
}}>
|
||||||
{elements}
|
<small>Press `ctl+h` to hide.</small>
|
||||||
<div>
|
</div>
|
||||||
{computedStates.length > 1 &&
|
<div>
|
||||||
<a onClick={::this.handleRollback}
|
<a onClick={::this.handleReset}
|
||||||
style={{ textDecoration: 'underline', cursor: 'hand' }}>
|
|
||||||
Rollback
|
|
||||||
</a>
|
|
||||||
}
|
|
||||||
{Object.keys(skippedActions).some(key => skippedActions[key]) &&
|
|
||||||
<span>
|
|
||||||
{' • '}
|
|
||||||
<a onClick={::this.handleSweep}
|
|
||||||
style={{ textDecoration: 'underline', cursor: 'hand' }}>
|
style={{ textDecoration: 'underline', cursor: 'hand' }}>
|
||||||
Sweep
|
<small>Reset</small>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</div>
|
||||||
}
|
</div>
|
||||||
{computedStates.length > 1 &&
|
{elements}
|
||||||
<span>
|
<div>
|
||||||
|
{computedStates.length > 1 &&
|
||||||
|
<a onClick={::this.handleRollback}
|
||||||
|
style={{ textDecoration: 'underline', cursor: 'hand' }}>
|
||||||
|
Rollback
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
{Object.keys(skippedActions).some(key => skippedActions[key]) &&
|
||||||
<span>
|
<span>
|
||||||
{' • '}
|
{' • '}
|
||||||
|
<a onClick={::this.handleSweep}
|
||||||
|
style={{ textDecoration: 'underline', cursor: 'hand' }}>
|
||||||
|
Sweep
|
||||||
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<a onClick={::this.handleCommit}
|
}
|
||||||
style={{ textDecoration: 'underline', cursor: 'hand' }}>
|
{computedStates.length > 1 &&
|
||||||
Commit
|
<span>
|
||||||
</a>
|
<span>
|
||||||
</span>
|
{' • '}
|
||||||
}
|
</span>
|
||||||
|
<a onClick={::this.handleCommit}
|
||||||
|
style={{ textDecoration: 'underline', cursor: 'hand' }}>
|
||||||
|
Commit
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
);
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user