fix: many bug fixes and some performance improvements

Co-authored-by: Alex Sparkes <turbomarshmello@gmail.com>
This commit is contained in:
David Ralph
2021-04-11 15:53:11 +01:00
parent 465596d22d
commit fbc656f978
16 changed files with 91 additions and 65 deletions

View File

@@ -19,9 +19,9 @@ export default class View extends React.PureComponent {
);
}
viewStuff() {
maximise = () => {
// elements to hide
const elements = ['.searchBar', '.clock', '.greeting', '.quotediv', 'time', '.quicklinks-container', '.weather'];
const elements = ['.searchBar', '.clock', '.greeting', '.quotediv', 'time', '.quicklinks-container', '.weather', '.date'];
elements.forEach((element) => {
try {
@@ -47,13 +47,9 @@ export default class View extends React.PureComponent {
}
render() {
if (localStorage.getItem('background') === 'false') {
return null;
}
return (
<Tooltip title='View' placement='top'>
<FullscreenIcon onClick={() => this.viewStuff()} className='topicons' />
<Tooltip title={window.language.modals.main.settings.sections.background.buttons.view} placement='top'>
<FullscreenIcon onClick={this.maximise} className='topicons' />
</Tooltip>
);
}