github.com/alexdevranger/node-1.8.27@v0.0.0-20221128213301-aa5841e41d2d/dashboard/assets/common.jsx (about)

     1  // @flow
     2  
     3  // Copyright 2017 The go-ethereum Authors
     4  // This file is part of the go-dubxcoin library.
     5  //
     6  // The go-dubxcoin library is free software: you can redistribute it and/or modify
     7  // it under the terms of the GNU Lesser General Public License as published by
     8  // the Free Software Foundation, either version 3 of the License, or
     9  // (at your option) any later version.
    10  //
    11  // The go-dubxcoin library is distributed in the hope that it will be useful,
    12  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    14  // GNU Lesser General Public License for more details.
    15  //
    16  // You should have received a copy of the GNU Lesser General Public License
    17  // along with the go-dubxcoin library. If not, see <http://www.gnu.org/licenses/>.
    18  
    19  type ProvidedMenuProp = {| title: string, icon: string |};
    20  const menuSkeletons: Array<{| id: string, menu: ProvidedMenuProp |}> = [
    21    {
    22      id: "home",
    23      menu: {
    24        title: "Home",
    25        icon: "home",
    26      },
    27    },
    28    {
    29      id: "chain",
    30      menu: {
    31        title: "Chain",
    32        icon: "link",
    33      },
    34    },
    35    {
    36      id: "txpool",
    37      menu: {
    38        title: "TxPool",
    39        icon: "credit-card",
    40      },
    41    },
    42    {
    43      id: "network",
    44      menu: {
    45        title: "Network",
    46        icon: "globe",
    47      },
    48    },
    49    {
    50      id: "system",
    51      menu: {
    52        title: "System",
    53        icon: "tachometer",
    54      },
    55    },
    56    {
    57      id: "logs",
    58      menu: {
    59        title: "Logs",
    60        icon: "list",
    61      },
    62    },
    63  ];
    64  export type MenuProp = {| ...ProvidedMenuProp, id: string |};
    65  // The sidebar menu and the main content are rendered based on these elements.
    66  // Using the id is circumstantial in some cases, so it is better to insert it also as a value.
    67  // This way the mistyping is prevented.
    68  export const MENU: Map<string, { ...MenuProp }> = new Map(
    69    menuSkeletons.map(({ id, menu }) => [id, { id, ...menu }])
    70  );
    71  
    72  export const DURATION = 200;
    73  
    74  export const styles = {
    75    light: {
    76      color: "rgba(255, 255, 255, 0.54)",
    77    },
    78  };