tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

DebugTargetErrorPage.js (1375B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 "use strict";
      6 
      7 const {
      8  PureComponent,
      9 } = require("resource://devtools/client/shared/vendor/react.mjs");
     10 const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js");
     11 const PropTypes = require("resource://devtools/client/shared/vendor/react-prop-types.mjs");
     12 
     13 /**
     14 * This component is displayed when the about:devtools-toolbox fails to load
     15 * properly due to wrong parameters or debug targets that don't exist.
     16 */
     17 class DebugTargetErrorPage extends PureComponent {
     18  static get propTypes() {
     19    return {
     20      errorMessage: PropTypes.string.isRequired,
     21      L10N: PropTypes.object.isRequired,
     22    };
     23  }
     24 
     25  render() {
     26    const { errorMessage, L10N } = this.props;
     27 
     28    return dom.article(
     29      {
     30        className: "error-page qa-error-page",
     31      },
     32      dom.h1(
     33        {
     34          className: "error-page__title",
     35        },
     36        L10N.getStr("toolbox.debugTargetErrorPage.title")
     37      ),
     38      dom.p({}, L10N.getStr("toolbox.debugTargetErrorPage.description")),
     39      dom.output(
     40        {
     41          className: "error-page__details",
     42        },
     43        errorMessage
     44      )
     45    );
     46  }
     47 }
     48 
     49 module.exports = DebugTargetErrorPage;