ServiceWorkersWarning.js (1529B)
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 createFactory, 9 PureComponent, 10 } = require("resource://devtools/client/shared/vendor/react.mjs"); 11 const dom = require("resource://devtools/client/shared/vendor/react-dom-factories.js"); 12 13 const FluentReact = require("resource://devtools/client/shared/vendor/fluent-react.js"); 14 const Localized = createFactory(FluentReact.Localized); 15 16 const Message = createFactory( 17 require("resource://devtools/client/aboutdebugging/src/components/shared/Message.js") 18 ); 19 20 const { 21 MESSAGE_LEVEL, 22 } = require("resource://devtools/client/aboutdebugging/src/constants.js"); 23 const DOC_URL = 24 "https://firefox-source-docs.mozilla.org/devtools-user/about_colon_debugging/index.html#service-workers-not-compatible"; 25 26 class ServiceWorkersWarning extends PureComponent { 27 render() { 28 return Message( 29 { 30 level: MESSAGE_LEVEL.WARNING, 31 isCloseable: true, 32 }, 33 Localized( 34 { 35 id: "about-debugging-runtime-service-workers-not-compatible", 36 a: dom.a({ 37 href: DOC_URL, 38 target: "_blank", 39 }), 40 }, 41 dom.p( 42 { 43 className: "qa-service-workers-warning", 44 }, 45 "about-debugging-runtime-service-workers-not-compatible" 46 ) 47 ) 48 ); 49 } 50 } 51 52 module.exports = ServiceWorkersWarning;