mirror of
https://github.com/mue/mue.git
synced 2026-07-10 22:14:39 +02:00
feat: add show navbar on hover setting back
This commit is contained in:
@@ -54,8 +54,8 @@ export default class Navbar extends PureComponent {
|
||||
|
||||
render() {
|
||||
const backgroundEnabled = (localStorage.getItem('background') === 'true');
|
||||
|
||||
return (
|
||||
|
||||
const navbar = (
|
||||
<div className='navbar-container' ref={this.navbarContainer}>
|
||||
{(localStorage.getItem('view') === 'true' && backgroundEnabled) ? <Maximise/> : null}
|
||||
{(localStorage.getItem('favouriteEnabled') === 'true' && backgroundEnabled) ? <Favourite/> : null}
|
||||
@@ -84,5 +84,11 @@ export default class Navbar extends PureComponent {
|
||||
</Tooltip>
|
||||
</div>
|
||||
);
|
||||
|
||||
if (localStorage.getItem('navbarHover') === 'true') {
|
||||
return <div className='navbar-hover'>{navbar}</div>;
|
||||
} else {
|
||||
return navbar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,3 +32,21 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-hover {
|
||||
position: absolute;
|
||||
top: 0rem;
|
||||
right: 0rem;
|
||||
height: 50px;
|
||||
width: 500px;
|
||||
|
||||
.navbar-container {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.navbar-container {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user