fix: various modal fixes

This commit is contained in:
David Ralph
2021-04-27 22:17:36 +01:00
parent 8f629b1ef9
commit 2afc9159cf
13 changed files with 55 additions and 16 deletions

View File

@@ -180,7 +180,7 @@ legend {
}
}
.tab-content {
.changelogtab {
h1 {
max-width: 85%;
}

View File

@@ -36,8 +36,8 @@ export default class About extends React.PureComponent {
}
return this.setState({
update: 'Failed to get update information',
loading: 'An error occurred'
update: this.language.version.error.title,
loading: this.language.version.error.description
});
}
@@ -66,7 +66,8 @@ export default class About extends React.PureComponent {
componentDidMount() {
if (navigator.onLine === false || localStorage.getItem('offlineMode') === 'true') {
this.setState({
update: this.language.version.offline_mode
update: this.language.version.offline_mode,
loading: window.language.modals.update.offline.title
});
return;
}

View File

@@ -98,7 +98,7 @@ export default class Changelog extends React.PureComponent {
}
return (
<>
<div className='changelogtab'>
<h1 style={{ 'marginBottom': '-10px' }}>{this.state.title}</h1>
<h5 style={{ 'lineHeight': '0px' }}>{this.state.author} {this.state.date}</h5>
{this.state.image ? <img draggable='false' src={this.state.image} alt={window.language.modals.update.title} className='updateimage'/> : null}
@@ -106,7 +106,7 @@ export default class Changelog extends React.PureComponent {
<Modal closeTimeoutMS={100} onRequestClose={() => this.setState({ showLightbox: false })} isOpen={this.state.showLightbox} className='Modal lightboxmodal' overlayClassName='Overlay resetoverlay' ariaHideApp={false}>
<Lightbox modalClose={() => this.setState({ showLightbox: false })} img={this.state.lightboxImg}/>
</Modal>
</>
</div>
);
}
}

View File

@@ -78,7 +78,9 @@ export default class BackgroundSettings extends React.PureComponent {
componentDidMount() {
if (navigator.onLine === false || localStorage.getItem('offlineMode') === 'true') {
return;
return this.setState({
backgroundCategories: [window.language.modals.update.offline.title]
});
}
this.getBackgroundCategories();