fix: optimise background settings, add missing translation

This commit is contained in:
David Ralph
2021-09-11 13:33:26 +01:00
parent 66a3629b51
commit 1c65447c55
10 changed files with 11 additions and 6 deletions

View File

@@ -21,7 +21,7 @@ export default class BackgroundSettings extends PureComponent {
constructor() {
super();
this.state = {
customBackground: [''],
customBackground: this.getCustom(),
backgroundType: localStorage.getItem('backgroundType') || 'api',
backgroundCategories: [this.getMessage(this.languagecode, 'modals.main.loading')]
};
@@ -121,10 +121,6 @@ export default class BackgroundSettings extends PureComponent {
}
componentDidMount() {
this.setState({
customBackground: this.getCustom()
});
if (navigator.onLine === false || localStorage.getItem('offlineMode') === 'true') {
return this.setState({
backgroundCategories: [this.getMessage(this.languagecode, 'modals.update.offline.title')]
@@ -227,7 +223,7 @@ export default class BackgroundSettings extends PureComponent {
<Checkbox name='ddgProxy' text={getMessage(languagecode, 'modals.main.settings.sections.background.ddg_image_proxy')} element='.other' />
<Checkbox name='bgtransition' text={getMessage(languagecode, 'modals.main.settings.sections.background.transition')} element='.other' />
<Checkbox name='photoInformation' text={getMessage(languagecode, 'modals.main.settings.sections.background.photo_information')} element='.other' />
<Checkbox name='photoMap' text='Show location map on photo information if available' element='.other'/>
<Checkbox name='photoMap' text={getMessage(languagecode, 'modals.main.settings.sections.background.show_map')} element='.other'/>
<h3>{getMessage(languagecode, 'modals.main.settings.sections.background.source.title')}</h3>
<Dropdown label={getMessage(languagecode, 'modals.main.settings.sections.background.type.title')} name='backgroundType' onChange={(value) => this.setState({ backgroundType: value })} category='background'>

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "DuckDuckGo Bilder Proxy verwenden",
"transition": "Weicher übergang",
"photo_information": "Foto-Informationen anzeigen",
"show_map": "Show location map on photo information if available",
"category": "Kategorie",
"buttons": {
"title": "Schaltflächen",

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "Use DuckDuckGo image proxy",
"transition": "Fade-in transition",
"photo_information": "Show photo information",
"show_map": "Show location map on photo information if available",
"category": "Category",
"buttons": {
"title": "Buttons",

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "Use DuckDuckGo image proxy",
"transition": "Fade-in transition",
"photo_information": "Show photo information",
"show_map": "Show location map on photo information if available",
"category": "Category",
"buttons": {
"title": "Buttons",

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "Utilizar el proxy de imágenes de DuckDuckGo",
"transition": "Transición fade-in",
"photo_information": "Ver información de la foto",
"show_map": "Show location map on photo information if available",
"category": "Categoría",
"buttons": {
"title": "Botones",

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "Utiliser le proxy d'image DuckDuckGo",
"transition": "Transition en fondu",
"photo_information": "Show photo information",
"show_map": "Show location map on photo information if available",
"category": "Catégorie",
"buttons": {
"title": "Boutons",

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "Use DuckDuckGo image proxy",
"transition": "Fade-in transition",
"photo_information": "Show photo information",
"show_map": "Show location map on photo information if available",
"category": "Category",
"buttons": {
"title": "Buttons",

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "Use DuckDuckGo image proxy",
"transition": "Fade-in transition",
"photo_information": "Show photo information",
"show_map": "Show location map on photo information if available",
"category": "Category",
"buttons": {
"title": "Buttons",

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "Use DuckDuckGo image proxy",
"transition": "Fade-in transition",
"photo_information": "Show photo information",
"show_map": "Show location map on photo information if available",
"category": "Category",
"buttons": {
"title": "Buttons",

View File

@@ -132,6 +132,7 @@
"ddg_image_proxy": "使用 DuckDuckGo 图像代理",
"transition": "渐变",
"photo_information": "Show photo information",
"show_map": "Show location map on photo information if available",
"category": "分类",
"buttons": {
"title": "按钮",