some stuff
This commit is contained in:
parent
84be3a163b
commit
6a6fd4d559
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -11,6 +11,6 @@ gulp.task("watch-css", function() {
|
|||
function minifyCSS() {
|
||||
return gulp.src("./src/styles/index.css")
|
||||
.pipe(csso({restructure: false}))
|
||||
.pipe(rename("style.min.css"))
|
||||
.pipe(rename("style.css"))
|
||||
.pipe(gulp.dest("./dist"));
|
||||
}
|
|
@ -1,3 +1,11 @@
|
|||
/* Error Boundary stuff */
|
||||
.react-error {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bd-settings-group.collapsible .bd-settings-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import {React, Logger} from "modules";
|
||||
|
||||
import {remote} from "electron";
|
||||
export default class ErrorBoundary extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {hasError: false};
|
||||
}
|
||||
|
||||
componentDidCatch() {
|
||||
componentDidCatch(error, errorInfo) {
|
||||
this.setState({hasError: true});
|
||||
}
|
||||
|
||||
render() {
|
||||
if (this.state.hasError) return <div className="react-error">Component Error</div>;
|
||||
if (this.state.hasError) return <div onClick={() => remote.getCurrentWindow().openDevTools()} className="react-error">There was an unexpected Error. Click to open console for more details.</div>;
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ export default class AddonCard extends React.Component {
|
|||
catch (err) { Logger.stacktrace("Addon Settings", "Unable to get settings panel for " + name + ".", err); }
|
||||
|
||||
const props = {id: `${name}-settings`, className: "addon-settings", ref: this.panelRef};
|
||||
if (typeof(settingsPanel) == "string") {
|
||||
if (typeof(this.settingsPanel) == "string") {
|
||||
Logger.warn("Addon Settings", "Using a DOMString is officially deprecated.");
|
||||
props.dangerouslySetInnerHTML = this.settingsPanel;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue