mirror of
https://github.com/mue/mue.git
synced 2026-07-26 02:01:19 +02:00
feat: add photo information icon toggle option and optimise font
This commit is contained in:
@@ -149,6 +149,7 @@ export default class BackgroundSettings extends React.PureComponent {
|
||||
<Switch name='background' text={this.language.enabled} category='background' />
|
||||
<Checkbox name='ddgProxy' text={background.ddg_proxy} />
|
||||
<Checkbox name='bgtransition' text={background.transition} />
|
||||
<Checkbox name='photoInformation' text={background.photo_information} category='background' element='.photoInformation' />
|
||||
|
||||
<h3>{background.source.title}</h3>
|
||||
<Dropdown label={background.type.title} name='backgroundType' onChange={(value) => this.setState({ backgroundType: value })} category='background'>
|
||||
|
||||
@@ -49,25 +49,26 @@ export default function PhotoInformation(props) {
|
||||
return (
|
||||
<div className='photoInformation'>
|
||||
<h1>{photo} <span id='credit'>{credit}</span></h1>
|
||||
<Info className='photoInformationHover'/>
|
||||
<div className={props.className || 'infoCard'}>
|
||||
<Info className='infoIcon'/>
|
||||
<h1>{language.information}</h1>
|
||||
<hr/>
|
||||
<Location/>
|
||||
<span id='infoLocation'>{props.info.location || 'N/A'}</span>
|
||||
<Camera/>
|
||||
<span id='infoCamera'>{props.info.camera || 'N/A'}</span>
|
||||
<Resolution/>
|
||||
<span id='infoResolution'>{props.info.resolution || 'N/A'}</span>
|
||||
<Photographer/>
|
||||
<span>{photographer}</span>
|
||||
{(localStorage.getItem('downloadbtn') === 'true') && !props.info.offline && !props.info.photographerURL ?
|
||||
<>
|
||||
<Download/>
|
||||
<span className='download' onClick={() => downloadImage(props.info)}>{language.download}</span>
|
||||
</> : null}
|
||||
</div>
|
||||
{localStorage.getItem('photoInformation') !== 'false' ? <><Info className='photoInformationHover'/>
|
||||
<div className={props.className || 'infoCard'}>
|
||||
<Info className='infoIcon'/>
|
||||
<h1>{language.information}</h1>
|
||||
<hr/>
|
||||
<Location/>
|
||||
<span id='infoLocation'>{props.info.location || 'N/A'}</span>
|
||||
<Camera/>
|
||||
<span id='infoCamera'>{props.info.camera || 'N/A'}</span>
|
||||
<Resolution/>
|
||||
<span id='infoResolution'>{props.info.resolution || 'N/A'}</span>
|
||||
<Photographer/>
|
||||
<span>{photographer}</span>
|
||||
{(localStorage.getItem('downloadbtn') === 'true') && !props.info.offline && !props.info.photographerURL ?
|
||||
<>
|
||||
<Download/>
|
||||
<span className='download' onClick={() => downloadImage(props.info)}>{language.download}</span>
|
||||
</> : null}
|
||||
</div>
|
||||
</>: null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,8 +8,7 @@ import './scss/index.scss';
|
||||
// the toast css is based on default so we need to import it
|
||||
import 'react-toastify/dist/ReactToastify.min.css';
|
||||
|
||||
import '@fontsource/lexend-deca/latin-400.css';
|
||||
import '@fontsource/montserrat/cyrillic-500.css';
|
||||
import '@fontsource/lexend-deca/400.css';
|
||||
|
||||
// language
|
||||
import merge from '@material-ui/utils/esm/deepmerge';
|
||||
@@ -23,6 +22,11 @@ if (languagecode === 'en') {
|
||||
window.languagecode = 'en_GB';
|
||||
}
|
||||
|
||||
// only load font if needed
|
||||
if (languagecode === 'ru') {
|
||||
require('@fontsource/montserrat/cyrillic-500.css');
|
||||
}
|
||||
|
||||
// these are merged so if a string is untranslated it doesn't break mue
|
||||
window.language = merge(require('./translations/en_GB.json'), require(`./translations/${window.languagecode}.json`));
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "Hintergrund",
|
||||
"ddg_proxy": "DuckDuckGo Bilder Proxy verwenden",
|
||||
"transition": "Weicher übergang",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Kategorie",
|
||||
"buttons": {
|
||||
"title": "Schaltflächen",
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "Background",
|
||||
"ddg_proxy": "Use DuckDuckGo image proxy",
|
||||
"transition": "Fade-in transition",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Category",
|
||||
"buttons": {
|
||||
"title": "Buttons",
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "Background",
|
||||
"ddg_proxy": "Use DuckDuckGo image proxy",
|
||||
"transition": "Fade-in transition",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Category",
|
||||
"buttons": {
|
||||
"title": "Buttons",
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "Fondo",
|
||||
"ddg_proxy": "Utilizar el proxy de imágenes de DuckDuckGo",
|
||||
"transition": "Transición fade-in",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Categoría",
|
||||
"buttons": {
|
||||
"title": "Botones",
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "Fond",
|
||||
"ddg_proxy": "Utiliser le proxy d'image DuckDuckGo",
|
||||
"transition": "Transition en fondu",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Catégorie",
|
||||
"buttons": {
|
||||
"title": "Boutons",
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "Achtergrond",
|
||||
"ddg_proxy": "Use DuckDuckGo image proxy",
|
||||
"transition": "Fade-in transition",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Category",
|
||||
"buttons": {
|
||||
"title": "Buttons",
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "Bakgrunn",
|
||||
"ddg_proxy": "Use DuckDuckGo image proxy",
|
||||
"transition": "Fade-in transition",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Category",
|
||||
"buttons": {
|
||||
"title": "Buttons",
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "Фон",
|
||||
"ddg_proxy": "Use DuckDuckGo image proxy",
|
||||
"transition": "Fade-in transition",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Category",
|
||||
"buttons": {
|
||||
"title": "Buttons",
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
"title": "背景",
|
||||
"ddg_proxy": "Use DuckDuckGo image proxy",
|
||||
"transition": "Fade-in transition",
|
||||
"photo_information": "Show photo information",
|
||||
"category": "Category",
|
||||
"buttons": {
|
||||
"title": "Buttons",
|
||||
|
||||
Reference in New Issue
Block a user