mirror of
https://github.com/mue/mue.git
synced 2026-07-16 21:44:22 +02:00
fix: some bug fixes
This commit is contained in:
@@ -30,18 +30,12 @@ export default class BackgroundSettings extends React.PureComponent {
|
||||
this.setState({
|
||||
customBackground: ''
|
||||
});
|
||||
toast(this.language.toasts.reset);
|
||||
toast(window.language.toasts.reset);
|
||||
EventBus.dispatch('refresh', 'background');
|
||||
}
|
||||
|
||||
customBackground(e, text) {
|
||||
let result;
|
||||
if (text === true) {
|
||||
result = e.target.value;
|
||||
} else {
|
||||
result = e.target.result;
|
||||
}
|
||||
|
||||
const result = (text === true) ? e.target.value : e.target.result;
|
||||
localStorage.setItem('customBackground', result);
|
||||
this.setState({
|
||||
customBackground: result
|
||||
@@ -83,6 +77,10 @@ export default class BackgroundSettings extends React.PureComponent {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (navigator.onLine === false || localStorage.getItem('offlineMode') === 'true') {
|
||||
return;
|
||||
}
|
||||
|
||||
this.getBackgroundCategories();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user