feat: download image button (wip)

This commit is contained in:
David Ralph
2021-04-07 10:57:28 +01:00
parent 670f897a80
commit ee9e5d2a90
6 changed files with 68 additions and 12 deletions

View File

@@ -16,7 +16,8 @@ export default class Background extends React.PureComponent {
credit: '',
location: 'N/A',
camera: 'N/A',
resolution: 'N/A'
resolution: 'N/A',
url: ''
}
};
this.language = window.language.widgets.background;
@@ -124,10 +125,11 @@ export default class Background extends React.PureComponent {
this.setState({
url: data.file,
photoInfo: {
credit: (backgroundAPI !== 'unsplash') ? data.photographer : data.photographer + ' on Unsplash',
credit: (backgroundAPI !== 'unsplash') ? data.photographer : data.photographer + ` ${this.language.unsplash}`,
location: (data.location.replace(/[null]+/g, '') !== ' ') ? data.location : 'N/A',
camera: data.camera || 'N/A',
resolution: data.resolution || 'N/A'
resolution: data.resolution || 'N/A',
url: data.file
}
});
break;