mirror of
https://github.com/mue/mue.git
synced 2026-07-10 22:14:39 +02:00
feat: navbar zoom
This commit is contained in:
@@ -11,12 +11,23 @@ import EventBus from '../../../modules/helpers/eventbus';
|
||||
import './scss/index.scss';
|
||||
|
||||
export default class Navbar extends PureComponent {
|
||||
setZoom() {
|
||||
const zoomNavbar = Number((localStorage.getItem('zoomNavbar') || 100) / 100);
|
||||
const navbarIcons = document.querySelectorAll('.navbar-container');
|
||||
for (let i = 0; i < navbarIcons.length; i++) {
|
||||
navbarIcons[i].style.fontSize = `${zoomNavbar}em`;
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
EventBus.on('refresh', (data) => {
|
||||
if (data === 'navbar') {
|
||||
this.forceUpdate();
|
||||
this.setZoom();
|
||||
}
|
||||
});
|
||||
|
||||
this.setZoom();
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
svg {
|
||||
float: left;
|
||||
font-size: 1em !important;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
@@ -45,7 +46,7 @@ textarea {
|
||||
|
||||
.topbarnotes {
|
||||
svg {
|
||||
font-size: 46px;
|
||||
font-size: 46px !important;
|
||||
padding: 9px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user