From ed040307a37e04892e1973892d60973854b1e822 Mon Sep 17 00:00:00 2001 From: hensm Date: Thu, 20 Aug 2020 22:11:42 +0100 Subject: [PATCH] Move options about component to separate module --- ext/src/ui/options/About.tsx | 100 +++++++++++++++++++++++++++++++++++ ext/src/ui/options/index.tsx | 98 +--------------------------------- 2 files changed, 102 insertions(+), 96 deletions(-) create mode 100644 ext/src/ui/options/About.tsx diff --git a/ext/src/ui/options/About.tsx b/ext/src/ui/options/About.tsx new file mode 100644 index 0000000..790d5c9 --- /dev/null +++ b/ext/src/ui/options/About.tsx @@ -0,0 +1,100 @@ +"use strict"; + +import React from "react"; + + +const LICENSE = +`Copyright (c) 2018 Matt Hensman + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.`; + + +const Translator = (props: { name: string, tag: string }) => +
  • + { props.name } +
    + { props.tag } +
    +
  • ; + +export default () => +
    + +

    About

    +
    +
    + + +
    + +
    + +

    License

    +
    + +
    + +
    + +
    + +

    Translators

    +
    +
      + + + + +
    +
    +
    +
    ; diff --git a/ext/src/ui/options/index.tsx b/ext/src/ui/options/index.tsx index 87c2a06..250c3f4 100644 --- a/ext/src/ui/options/index.tsx +++ b/ext/src/ui/options/index.tsx @@ -6,6 +6,7 @@ import ReactDOM from "react-dom"; import defaultOptions from "../../defaultOptions"; +import About from "./About"; import Bridge from "./Bridge"; import EditableList from "./EditableList"; @@ -19,26 +20,6 @@ import { ReceiverSelectorType } from "../../background/receiverSelector"; const _ = browser.i18n.getMessage; -const LICENSE = -`Copyright (c) 2018 Matt Hensman - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.`; // macOS styles browser.runtime.getPlatformInfo() @@ -179,82 +160,7 @@ class OptionsApp extends Component<{}, OptionsAppState> { return (
    -
    - -

    About

    -
    -
    - - -
    - -
    - -

    License

    -
    - -
    - -
    - -
    - -

    Translators

    -
    -
      -
    • - @RAVMN -
      es
      -
    • -
    • - @rimrul -
      de
      -
    • -
    • - @ThaDaVos -
      nl
      -
    • -
    • - @Vistaus -
      nl
      -
    • -
    -
    -
    -
    +
    { this.form = form; }} onSubmit={ this.handleFormSubmit } onChange={ this.handleFormChange }>