mirror of https://github.com/mue/mue.git
chore(fix): deprecate pexels, explanation to come
This commit is contained in:
parent
e385dc6503
commit
a035b70841
|
@ -180,11 +180,7 @@ export default class BackgroundSettings extends PureComponent {
|
|||
{
|
||||
name: 'Unsplash',
|
||||
value: 'unsplash',
|
||||
},
|
||||
{
|
||||
name: 'Pexels',
|
||||
value: 'pexels',
|
||||
},
|
||||
}
|
||||
]}
|
||||
name="backgroundAPI"
|
||||
category="background"
|
||||
|
|
|
@ -107,10 +107,8 @@ export default class Background extends PureComponent {
|
|||
let requestURL, data;
|
||||
switch (backgroundAPI) {
|
||||
case 'unsplash':
|
||||
requestURL = `${variables.constants.API_URL}/images/unsplash?categories=${apiCategories}&quality=${apiQuality}`;
|
||||
break;
|
||||
case 'pexels':
|
||||
requestURL = `${variables.constants.API_URL}/images/pexels?quality=${apiQuality}`;
|
||||
requestURL = `${variables.constants.API_URL}/images/unsplash?categories=${apiCategories}&quality=${apiQuality}`;
|
||||
break;
|
||||
// Defaults to Mue
|
||||
default:
|
||||
|
@ -129,7 +127,7 @@ export default class Background extends PureComponent {
|
|||
|
||||
let photoURL, photographerURL;
|
||||
|
||||
if (backgroundAPI === 'unsplash' || backgroundAPI === 'pexels') {
|
||||
if (backgroundAPI === 'unsplash') {
|
||||
photoURL = data.photo_page;
|
||||
photographerURL = data.photographer_page;
|
||||
}
|
||||
|
|
|
@ -68,48 +68,29 @@ function PhotoInformation({ info, url, api }) {
|
|||
return null;
|
||||
}
|
||||
|
||||
// remove unsplash and pexels text
|
||||
// remove unsplash text
|
||||
const unsplash = variables.getMessage('widgets.background.unsplash');
|
||||
const pexels = variables.getMessage('widgets.background.pexels');
|
||||
|
||||
let credit = info.credit;
|
||||
let photo = variables.getMessage('widgets.background.credit');
|
||||
|
||||
// unsplash and pexels credit
|
||||
// unsplash credit
|
||||
if (info.photographerURL && info.photographerURL !== '' && !info.offline && api) {
|
||||
if (api === 'unsplash') {
|
||||
photo = (
|
||||
<a href={info.photoURL + '?utm_source=mue'} target="_blank" rel="noopener noreferrer">
|
||||
{photo}
|
||||
photo = (
|
||||
<a href={info.photoURL + '?utm_source=mue'} target="_blank" rel="noopener noreferrer">
|
||||
{photo}
|
||||
</a>
|
||||
);
|
||||
credit = (
|
||||
<>
|
||||
<a href={info.photographerURL} target="_blank" rel="noopener noreferrer">
|
||||
{info.credit}
|
||||
</a>{' '}
|
||||
<a href="https://unsplash.com?utm_source=mue" target="_blank" rel="noopener noreferrer">
|
||||
{unsplash}
|
||||
</a>
|
||||
);
|
||||
credit = (
|
||||
<>
|
||||
<a href={info.photographerURL} target="_blank" rel="noopener noreferrer">
|
||||
{info.credit}
|
||||
</a>{' '}
|
||||
<a href="https://unsplash.com?utm_source=mue" target="_blank" rel="noopener noreferrer">
|
||||
{unsplash}
|
||||
</a>
|
||||
</>
|
||||
);
|
||||
} else {
|
||||
photo = (
|
||||
<a href={info.photoURL} target="_blank" rel="noopener noreferrer">
|
||||
{photo}
|
||||
</a>
|
||||
);
|
||||
credit = (
|
||||
<>
|
||||
<a href={info.photographerURL} target="_blank" rel="noopener noreferrer">
|
||||
{info.credit}
|
||||
</a>{' '}
|
||||
<a href="https://pexels.com" target="_blank" rel="noopener noreferrer">
|
||||
{pexels}
|
||||
</a>
|
||||
</>
|
||||
);
|
||||
}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
const ddgProxy = localStorage.getItem('ddgProxy') === 'true';
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Informationen",
|
||||
"likes": "Likes",
|
||||
"location": "Location",
|
||||
"pexels": "pexels.com",
|
||||
"resolution": "Resolution",
|
||||
"source": "Source",
|
||||
"unsplash": "unsplash.com",
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
"background": {
|
||||
"credit": "Photo by",
|
||||
"unsplash": "on Unsplash",
|
||||
"pexels": "on Pexels",
|
||||
"information": "Information",
|
||||
"download": "Download",
|
||||
"downloads": "Downloads",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Information",
|
||||
"likes": "Likes",
|
||||
"location": "Location",
|
||||
"pexels": "on Pexels",
|
||||
"resolution": "Resolution",
|
||||
"source": "Source",
|
||||
"unsplash": "on Unsplash",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Información",
|
||||
"likes": "Likes",
|
||||
"location": "Location",
|
||||
"pexels": "en Pexels",
|
||||
"resolution": "Resolution",
|
||||
"source": "Source",
|
||||
"unsplash": "en Unsplash",
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
"background": {
|
||||
"credit": "Foto por",
|
||||
"unsplash": "en Unsplash",
|
||||
"pexels": "en Pexels",
|
||||
"information": "Información",
|
||||
"download": "Descargar",
|
||||
"downloads": "Descargas",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Information",
|
||||
"likes": "Likes",
|
||||
"location": "Location",
|
||||
"pexels": "sur Pexels",
|
||||
"resolution": "Resolution",
|
||||
"source": "Source",
|
||||
"unsplash": "sur Unsplash",
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
"background": {
|
||||
"credit": "Foto oleh",
|
||||
"unsplash": "di Unsplash",
|
||||
"pexels": "di Pexels",
|
||||
"information": "Informasi",
|
||||
"download": "Unduh",
|
||||
"downloads": "Downloads",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Information",
|
||||
"likes": "houdt van",
|
||||
"location": "Location",
|
||||
"pexels": "on Pexels",
|
||||
"resolution": "Resolution",
|
||||
"source": "Source",
|
||||
"unsplash": "on Unsplash",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Information",
|
||||
"likes": "Likes",
|
||||
"location": "Location",
|
||||
"pexels": "on Pexels",
|
||||
"resolution": "Resolution",
|
||||
"source": "Source",
|
||||
"unsplash": "on Unsplash",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Informação",
|
||||
"likes": "Curtidas",
|
||||
"location": "Localização",
|
||||
"pexels": "em Pexels",
|
||||
"resolution": "Resolução",
|
||||
"source": "Fonte",
|
||||
"unsplash": "no Unsplash",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Informação",
|
||||
"likes": "Curtidas",
|
||||
"location": "Localização",
|
||||
"pexels": "em Pexels",
|
||||
"resolution": "Resolução",
|
||||
"source": "Fonte",
|
||||
"unsplash": "no Unsplash",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Information",
|
||||
"likes": "Нравится",
|
||||
"location": "Локация",
|
||||
"pexels": "на Pexels",
|
||||
"resolution": "Разрешение",
|
||||
"source": "Источник",
|
||||
"unsplash": "на Unsplash",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "Bilgilendirme",
|
||||
"likes": "Beğeni",
|
||||
"location": "Konum",
|
||||
"pexels": ", Pexels",
|
||||
"resolution": "Çözünürlük",
|
||||
"source": "Kaynak",
|
||||
"unsplash": ", Unsplash",
|
||||
|
|
|
@ -658,7 +658,6 @@
|
|||
"information": "信息",
|
||||
"likes": "Likes",
|
||||
"location": "Location",
|
||||
"pexels": "@ Pexels",
|
||||
"resolution": "Resolution",
|
||||
"source": "Source",
|
||||
"unsplash": "@ Unsplash",
|
||||
|
|
Loading…
Reference in New Issue