github.com/xxRanger/go-ethereum@v1.8.23/dashboard/assets/common.jsx (about)

     1  // @flow
     2  
     3  // Copyright 2017 The go-ethereum Authors
     4  // This file is part of the go-ethereum library.
     5  //
     6  // The go-ethereum 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-ethereum 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-ethereum 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  		id:   'chain',
    29  		menu: {
    30  			title: 'Chain',
    31  			icon:  'link',
    32  		},
    33  	}, {
    34  		id:   'txpool',
    35  		menu: {
    36  			title: 'TxPool',
    37  			icon:  'credit-card',
    38  		},
    39  	}, {
    40  		id:   'network',
    41  		menu: {
    42  			title: 'Network',
    43  			icon:  'globe',
    44  		},
    45  	}, {
    46  		id:   'system',
    47  		menu: {
    48  			title: 'System',
    49  			icon:  'tachometer',
    50  		},
    51  	}, {
    52  		id:   'logs',
    53  		menu: {
    54  			title: 'Logs',
    55  			icon:  'list',
    56  		},
    57  	},
    58  ];
    59  export type MenuProp = {|...ProvidedMenuProp, id: string|};
    60  // The sidebar menu and the main content are rendered based on these elements.
    61  // Using the id is circumstantial in some cases, so it is better to insert it also as a value.
    62  // This way the mistyping is prevented.
    63  export const MENU: Map<string, {...MenuProp}> = new Map(menuSkeletons.map(({id, menu}) => ([id, {id, ...menu}])));
    64  
    65  export const DURATION = 200;
    66  
    67  export const styles = {
    68  	light: {
    69  		color: 'rgba(255, 255, 255, 0.54)',
    70  	},
    71  };