fix: background hot reload, settings issue, remove navbar hover setting

This commit is contained in:
David Ralph
2021-06-16 12:05:03 +01:00
parent dcddd78164
commit de1797c662
15 changed files with 53 additions and 81 deletions

View File

@@ -299,7 +299,10 @@ export default class Background extends React.PureComponent {
document.getElementById('backgroundVideo').style.display = 'block';
} else {
if (this.state.photoInfo.hidden === false) {
document.querySelector('.photoInformation').style.display = 'block';
// fix bug
try {
document.querySelector('.photoInformation').style.display = 'block';
} catch (e) {}
}
element.style.display = 'block';

View File

@@ -13,40 +13,35 @@ import Tooltip from '../../helpers/tooltip/Tooltip';
import './scss/index.scss';
export default function Navbar(props) {
const language = window.language;
const backgroundEnabled = (localStorage.getItem('background') === 'true');
return (
<>
{(localStorage.getItem('navbarHover') === 'true') ? <div className='navbar-hidden'/> : null}
<div className='navbar-container'>
{(localStorage.getItem('view') === 'true' && backgroundEnabled) ? <Maximise/> : null}
{(localStorage.getItem('favouriteEnabled') === 'true' && backgroundEnabled) ? <Favourite/> : null}
<div className='navbar-container'>
{(localStorage.getItem('view') === 'true' && backgroundEnabled) ? <Maximise/> : null}
{(localStorage.getItem('favouriteEnabled') === 'true' && backgroundEnabled) ? <Favourite/> : null}
{(localStorage.getItem('notesEnabled') === 'true') ?
<div className='notes'>
<NotesIcon className='topicons'/>
<Notes/>
</div>
:null}
{(localStorage.getItem('notesEnabled') === 'true') ?
<div className='notes'>
<NotesIcon className='topicons'/>
<Notes/>
</div>
: null}
{(window.constants.BETA_VERSION === true) ?
<Tooltip title={language.widgets.navbar.tooltips.feedback}>
<Report className='topicons' onClick={() => props.openModal('feedbackModal')}/>
</Tooltip>
: null}
{(localStorage.getItem('refresh') === 'true') ?
<Tooltip title={language.widgets.navbar.tooltips.refresh}>
<RefreshIcon className='refreshicon topicons' onClick={() => window.location.reload()}/>
</Tooltip>
: null}
<Tooltip title={language.modals.main.navbar.settings}>
<Gear className='settings-icon topicons' onClick={() => props.openModal('mainModal')}/>
{(window.constants.BETA_VERSION === true) ?
<Tooltip title={window.language.widgets.navbar.tooltips.feedback}>
<Report className='topicons' onClick={() => props.openModal('feedbackModal')}/>
</Tooltip>
</div>
</>
: null}
{(localStorage.getItem('refresh') === 'true') ?
<Tooltip title={window.language.widgets.navbar.tooltips.refresh}>
<RefreshIcon className='refreshicon topicons' onClick={() => window.location.reload()}/>
</Tooltip>
: null}
<Tooltip title={window.language.modals.main.navbar.settings}>
<Gear className='settings-icon topicons' onClick={() => props.openModal('mainModal')}/>
</Tooltip>
</div>
);
}

View File

@@ -36,24 +36,3 @@
.visibilityshow {
visibility: visible !important;
}
.navbar-hidden {
position: absolute;
width: 50vw;
right: 0;
top: 0;
background: none;
height: 75px;
+.navbar-container {
display: none;
}
&:hover {
display: block;
+.navbar-container {
display: block !important;
}
}
}