mirror of
https://github.com/mue/mue.git
synced 2026-07-17 14:04:09 +02:00
fix: firefox changelog date, cleanup background a bit
This commit is contained in:
@@ -25,7 +25,7 @@ export default class Changelog extends React.PureComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
let date = new Date(data.date);
|
||||
let date = new Date(data.date.split(' ')[0]);
|
||||
date = date.toLocaleDateString(window.languagecode.replace('_', '-'), {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
|
||||
@@ -99,7 +99,6 @@ export default class Background extends React.PureComponent {
|
||||
backgroundImage.classList.remove('backgroundPreload');
|
||||
backgroundImage.classList.add('fade-in');
|
||||
|
||||
// this doesn't make it fetch again which is nice
|
||||
backgroundImage.style.background = `url(${url})`;
|
||||
// remove the preloader element we created earlier
|
||||
preloader.remove();
|
||||
@@ -149,7 +148,6 @@ export default class Background extends React.PureComponent {
|
||||
let requestURL, data;
|
||||
switch (backgroundAPI) {
|
||||
case 'unsplash':
|
||||
//requestURL = `${window.constants.UNSPLASH_URL}/getImage?category=${apiCategory}`;
|
||||
requestURL = `${window.constants.UNSPLASH_URL}/images/random?quality=${apiQuality}`;
|
||||
break;
|
||||
case 'pexels':
|
||||
@@ -169,8 +167,7 @@ export default class Background extends React.PureComponent {
|
||||
}
|
||||
|
||||
let credit = data.photographer;
|
||||
let photoURL = '';
|
||||
let photographerURL = '';
|
||||
let photoURL, photographerURL;
|
||||
|
||||
if (backgroundAPI === 'unsplash') {
|
||||
credit = data.photographer + ` ${this.language.unsplash}`;
|
||||
@@ -308,7 +305,6 @@ export default class Background extends React.PureComponent {
|
||||
document.getElementById('backgroundVideo').style.display = 'block';
|
||||
} else {
|
||||
if (this.state.photoInfo.hidden === false) {
|
||||
// fix bug
|
||||
try {
|
||||
document.querySelector('.photoInformation').style.display = 'block';
|
||||
} catch (e) {
|
||||
|
||||
@@ -61,7 +61,9 @@ export default function PhotoInformation(props) {
|
||||
return (
|
||||
<div className='photoInformation'>
|
||||
<h1>{photo} <span id='credit'>{credit}</span></h1>
|
||||
{localStorage.getItem('photoInformation') !== 'false' ? <><Info className='photoInformationHover'/>
|
||||
{localStorage.getItem('photoInformation') !== 'false' ?
|
||||
<>
|
||||
<Info className='photoInformationHover'/>
|
||||
<div className={props.className || 'infoCard'}>
|
||||
<Info className='infoIcon'/>
|
||||
<h1>{language.information}</h1>
|
||||
@@ -80,7 +82,7 @@ export default function PhotoInformation(props) {
|
||||
<span className='download' onClick={() => downloadImage(props.info)}>{language.download}</span>
|
||||
</> : null}
|
||||
</div>
|
||||
</>: null}
|
||||
</> : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user