diff --git a/src/components/ErrorBoundary.jsx b/src/components/ErrorBoundary.jsx new file mode 100644 index 00000000..514e5891 --- /dev/null +++ b/src/components/ErrorBoundary.jsx @@ -0,0 +1,27 @@ +import React from 'react'; + +export default class ErrorBoundary extends React.PureComponent { + constructor(props) { + super(props); + this.state = { hasError: false, error: '' }; + } + + static getDerivedStateFromError(error) { + console.log(error); + return { hasError: true, error: error }; + } + + render() { + if (this.state.hasError) { + return ( +
Failed to load this component of Mue.
+ +Zoom (100%) {props.language.reset}
diff --git a/src/components/modals/settings/sections/Background.jsx b/src/components/modals/settings/sections/Background.jsx index ed7bb597..c1734989 100644 --- a/src/components/modals/settings/sections/Background.jsx +++ b/src/components/modals/settings/sections/Background.jsx @@ -210,7 +210,7 @@ export default class BackgroundSettings extends React.PureComponent {{this.props.language.background.blur} ({this.state.blur}%) this.resetItem('blur')}>{this.props.language.reset}
+{this.props.language.blur} ({this.state.blur}%) this.resetItem('blur')}>{this.props.language.reset}
this.setState({ blur: event.target.value })} />{this.props.language.background.brightness} ({this.state.brightness}%) this.resetItem('brightness')}>{this.props.language.reset}
+{this.props.language.brightness} ({this.state.brightness}%) this.resetItem('brightness')}>{this.props.language.reset}
this.setState({ brightness: event.target.value })} />{this.props.language.background.custom_url} this.resetItem('customBackground')}>{this.props.language.reset}
+{this.props.language.custom_url} this.resetItem('customBackground')}>{this.props.language.reset}
this.setState({ customBackground: e.target.value })}>{this.props.language.background.custom_background} this.resetItem('customBackground')}>{this.props.language.reset}
- +{this.props.language.custom_background} this.resetItem('customBackground')}>{this.props.language.reset}
+{this.props.language.background.custom_colour} this.resetItem('customBackgroundColour')}>{this.props.language.reset}
+{this.props.language.custom_colour} this.resetItem('customBackgroundColour')}>{this.props.language.reset}
{colourSettings}{this.props.language.greeting.name} this.resetItem()}>{this.props.language.reset}
+{this.props.language.name} this.resetItem()}>Reset
this.setState({ greetingName: e.target.value })}>{this.props.language.greeting.birthday_date}
+{this.props.language.birthday_date}
{this.props.language.searchbar.custom} this.resetSearch()}>{this.props.language.reset}
+{this.props.language.custom} this.resetSearch()}>{this.props.language.reset}