fix: background filters, addons ui, photoinformation

This commit is contained in:
David Ralph
2021-11-12 18:34:03 +00:00
parent a356c8fe61
commit e786ad654c
5 changed files with 14 additions and 15 deletions

View File

@@ -309,12 +309,13 @@ export default class Background extends PureComponent {
}
// background effects so we don't get another image again
const backgroundFilter = localStorage.getItem('backgroundFilter');
const backgroundFilterSetting = localStorage.getItem('backgroundFilter');
const backgroundFilter = backgroundFilterSetting && backgroundFilterSetting !== 'none';
if (this.state.video === true) {
document.getElementById('backgroundVideo').style.webkitFilter = `blur(${localStorage.getItem('blur')}px) brightness(${localStorage.getItem('brightness')}%) ${backgroundFilter ? backgroundFilter + '(' + localStorage.getItem('backgroundFilterAmount') + '%)' : ''}`;
document.getElementById('backgroundVideo').style.webkitFilter = `blur(${localStorage.getItem('blur')}px) brightness(${localStorage.getItem('brightness')}%) ${backgroundFilter ? backgroundFilterSetting + '(' + localStorage.getItem('backgroundFilterAmount') + '%)' : ''}`;
} else {
element.style.webkitFilter = `blur(${localStorage.getItem('blur')}px) brightness(${localStorage.getItem('brightness')}%) ${backgroundFilter ? backgroundFilter + '(' + localStorage.getItem('backgroundFilterAmount') + '%)' : ''}`;
element.style.webkitFilter = `blur(${localStorage.getItem('blur')}px) brightness(${localStorage.getItem('brightness')}%) ${backgroundFilter ? backgroundFilterSetting + '(' + localStorage.getItem('backgroundFilterAmount') + '%)' : ''}`;
}
}

View File

@@ -74,7 +74,7 @@ export default function PhotoInformation({ info, url, api }) {
);
}
const downloadEnabled = (localStorage.getItem('downloadbtn') === 'true') && !info.offline && !info.photographerURL;
const downloadEnabled = (localStorage.getItem('downloadbtn') === 'true') && !info.offline && !info.photographerURL && api;
const downloadBackground = () => {
if (downloadEnabled) {
downloadImage(info);

View File

@@ -73,6 +73,10 @@
font-size: 2em;
}
span {
user-select: text;
}
h1,
.MuiSvgIcon-root {
user-select: none;