+
)
}
diff --git a/webapp/src/components/ViewBPProfile/index.js b/webapp/src/components/ViewBPProfile/index.js
index 9a94b0d6a..1f43fafda 100644
--- a/webapp/src/components/ViewBPProfile/index.js
+++ b/webapp/src/components/ViewBPProfile/index.js
@@ -1,7 +1,6 @@
import React from 'react'
import { Link } from 'react-router-dom'
import { makeStyles } from '@mui/styles'
-import { useTranslation } from 'react-i18next'
import Button from '@mui/material/Button'
import { eosConfig } from '../../config'
@@ -10,13 +9,12 @@ import styles from './styles'
const useStyles = makeStyles(styles)
-const ViewBPProfile = ({ producer }) => {
+const ViewBPProfile = ({ producer, text }) => {
const classes = useStyles()
- const { t } = useTranslation('producerCardComponent')
return (
)
}
diff --git a/webapp/src/config/eos.config.js b/webapp/src/config/eos.config.js
index 35554eb6c..1ff232a2c 100644
--- a/webapp/src/config/eos.config.js
+++ b/webapp/src/config/eos.config.js
@@ -21,12 +21,11 @@ switch (networkName) {
_nodeTypes = [
{
name: 'validator',
- color: '#4f4363',
description: 'Node with signing key',
},
- { name: 'boot', color: '#6ec4e0', description: 'Boot node' },
- { name: 'writer', color: '#5484b3', description: 'Writer node' },
- { name: 'observer', color: '#000', description: 'Observer node' },
+ { name: 'boot', description: 'Boot node' },
+ { name: 'writer', description: 'Writer node' },
+ { name: 'observer', description: 'Observer node' },
]
_producerTypes = ['partners', 'nonPartners']
break
@@ -34,22 +33,18 @@ switch (networkName) {
_nodeTypes = [
{
name: 'producer',
- color: '#4f4363',
description: 'Node with signing key',
},
{
name: 'full',
- color: '#6ec4e0',
description: 'Node in front of producer',
},
{
name: 'query',
- color: '#5484b3',
description: 'Node that provides HTTP(S) API to the public',
},
{
name: 'seed',
- color: '#000',
description: 'Node that provides P2P and/or BNET to the public',
},
]
diff --git a/webapp/src/context/theme.context.js b/webapp/src/context/theme.context.js
new file mode 100644
index 000000000..8c6a5b615
--- /dev/null
+++ b/webapp/src/context/theme.context.js
@@ -0,0 +1,51 @@
+import React from 'react'
+import useMediaQuery from '@mui/material/useMediaQuery'
+import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles'
+import { ThemeProvider } from 'styled-components'
+
+import themes from '../theme'
+
+const ThemeStateContext = React.createContext({ toggleColorMode: () => {} })
+
+export const ThemeStateProvider = ({ children }) => {
+ const userRequest = useMediaQuery('(prefers-color-scheme: dark)')
+ const preference = localStorage.getItem('prefersDarkMode')
+ const prefersDarkMode = preference ? Boolean(JSON.parse(preference)) : userRequest
+
+ const [mode, setMode] = React.useState(prefersDarkMode ? 'dark' : 'light')
+
+ if (!preference) {
+ localStorage.setItem('prefersDarkMode', prefersDarkMode)
+ }
+
+ const colorMode = React.useMemo(
+ () => ({
+ toggleColorMode: () => {
+ setMode(prev => {
+ localStorage.setItem('prefersDarkMode', prev === 'light')
+
+ return prev === 'light' ? 'dark' : 'light'
+ })
+ },
+ }),
+ [],
+ )
+
+ const theme = React.useMemo(() => themes[mode === 'light' ? 0 : 1], [mode])
+
+ return (
+
+
+ {children}
+
+
+ )
+}
+
+export const useThemeStateContext = () => {
+ const context = React.useContext(ThemeStateContext)
+
+ const { toggleColorMode } = context
+
+ return [{}, { toggleColorMode }]
+}
diff --git a/webapp/src/index.js b/webapp/src/index.js
index f619565d4..f90713397 100644
--- a/webapp/src/index.js
+++ b/webapp/src/index.js
@@ -1,12 +1,11 @@
import React from 'react'
import { createRoot } from 'react-dom/client'
import { ApolloProvider } from '@apollo/client'
-import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles'
import { StylesProvider } from '@mui/styles'
-import { ThemeProvider } from 'styled-components'
+
+import { ThemeStateProvider } from 'context/theme.context'
import App from './App'
-import theme from './theme'
import { client } from './graphql'
import * as serviceWorker from './serviceWorker'
import './i18n'
@@ -17,11 +16,9 @@ const root = createRoot(container)
root.render(
-
-
-
-
-
+
+
+ ,
)
diff --git a/webapp/src/language/en.json b/webapp/src/language/en.json
index a3c6aee3f..e9f7b23f4 100644
--- a/webapp/src/language/en.json
+++ b/webapp/src/language/en.json
@@ -50,7 +50,8 @@
"nextUpdateAt": "Next update at",
"secondsAgo": "Seconds Ago",
"metaTitle": "Antelope Tools network monitors real-time infrastructure data for multiple Antelope and EOSIO chains.",
- "metaDescription": "Antelope Tools Dashboard is a network monitor featuring real-time data on block producer nodes and blockchain infrastructure for multiple Antelope and EOSIO chains."
+ "metaDescription": "Antelope Tools Dashboard is a network monitor featuring real-time data on block producer nodes and blockchain infrastructure for multiple Antelope and EOSIO chains.",
+ "goBack": "Go Back"
},
"routes": {
"/>sidebar": "Dashboard",
@@ -87,7 +88,7 @@
"/faucet>heading": "{{networkName}} Account Creator and Token Faucet",
"/ricardian-contract>sidebar": "BP Agreement",
"/ricardian-contract>title": "BP Agreement - {{networkName}} Network Dashboard",
- "/ricardian-contract>heading": "",
+ "/ricardian-contract>heading": "Block Producer Agreement on {{networkName}}",
"/block-distribution>sidebar": "Block Distribution",
"/block-distribution>title": "Block Production Distribution - {{networkName}} Network Dashboard",
"/block-distribution>heading": "Block Production Distribution on {{networkName}}",
@@ -112,11 +113,11 @@
"/about>sidebar": "About",
"/about>title": "About - {{networkName}} Network Monitor and Infrastructure Dashboard",
"/about>heading": "About Antelope Tools",
- "/about>moreDescription": "",
+ "/about>moreDescription": "Learn more about Edenia and the Antelope Tools project, its importance and how you can get involved",
"/help>sidebar": "Help",
"/help>title": "Help - {{networkName}} Network Dashboard",
"/help>heading": "Welcome to the Antelope Tools Help Center",
- "/help>moreDescription": "",
+ "/help>moreDescription": "Check how the bp.json Standard is used, troubleshoot if BP data is missing and contact us if you have suggestions",
"networkInformation": "Network Information",
"tools": "Tools",
"docs": "Docs",
@@ -132,10 +133,11 @@
"/undiscoverable-bps>moreDescription": "A list of the paid block producers on the network which do not provide information in their BP.json files.",
"/bpjson>moreDescription": "A tool for block producers to provide details of their organizations and nodes to comply with the BP information standard.",
"/node-config>moreDescription": "Use this tool to obtain example config files to help configure a new node on the network.",
- "/ricardian-contract>moreDescription": "The on-chain ricardian contract that describes the validator node agreement of this network.",
+ "/ricardian-contract>moreDescription": "The on-chain ricardian contract that describes the validator node agreement of {{networkName}}.",
"/>moreDescription": "Monitor the infrastructure of blockchain networks using Antelope + EOSIO blockchain technology.",
"/cpu-benchmark>moreDescription": "A visualization of CPU usage in microseconds by block producer nodes accounts, with lowest, highest, and average usage data.",
"/block-producers>moreDescription": "A list of the block producers in the network – blockchain accounts registered to run nodes on the network. It includes information from chain tables and their bp.json files.",
+ "/block-producers/bpName>moreDescription": "View block producer general information such as rank, rewards and compliance",
"/nodes>moreDescription": "A list of all the nodes run by block producers comprising the network with specific information such as endpoints and location.",
"/endpoints>moreDescription": "An updated list of public API endpoints provided by node operators and their health status.",
"/endpoints-stats>moreDescription": "Response time statistics from Costa Rica and the availability of a producer's endpoints.",
@@ -246,7 +248,7 @@
"keyFormat": "Enter a valid ECC key. You can generate one using cleos or any compatible wallet."
},
"ricardianContractRoute": {
- "title": "Block Producer Agreement"
+ "title": "Ricardian Contract"
},
"aboutRoute": {
"body": {
@@ -375,7 +377,8 @@
"logo_256": "Logo",
"organization_name": "Name",
"viewNodes": "View {{totalNodes}} nodes",
- "bpNodes": "{{bpName}} Nodes"
+ "bpNodes": "{{bpName}} Nodes",
+ "viewNodesProfile": "See Full Nodes Info"
},
"nodeCardComponent": {
"features": "Features",
@@ -442,7 +445,7 @@
"endpointsResponding": "Only endpoints responding",
"linkToStats": "Go to stats",
"filterEndpoints": "Filter responding endpoints",
- "copyToClipboard": "Copy responding endpoints from the column to the clipboard"
+ "copyToClipboard": "Click to Copy responding endpoints from the column to the clipboard"
},
"cpuBenchmarkRoute": {
"title": "CPU Usage in Microseconds",
diff --git a/webapp/src/language/es.json b/webapp/src/language/es.json
index 081d57a16..8dfa0a7e3 100644
--- a/webapp/src/language/es.json
+++ b/webapp/src/language/es.json
@@ -59,7 +59,8 @@
"noOptions": "Sin coincidencias",
"updatedAt": "Última actualización",
"nextUpdateAt": "Próxima actualización",
- "secondsAgo": "Hace Segundos"
+ "secondsAgo": "Hace Segundos",
+ "goBack": "Regresar"
},
"routes": {
"/>sidebar": "Panel",
@@ -99,7 +100,7 @@
"/faucet>heading": "Crear una Cuenta de {{networkName}} y Obtenga Tokens",
"/ricardian-contract>sidebar": "Acuerdo de Productor de Bloques",
"/ricardian-contract>title": "Acuerdo de Productor de Bloques - Panel de red de {{networkName}}",
- "/ricardian-contract>heading": "",
+ "/ricardian-contract>heading": "Acuerdo de Productor de Bloques en {{networkName}}",
"/block-distribution>sidebar": "Distribución de bloques",
"/block-distribution>title": "Distribución de bloques - Panel de red de {{networkName}}",
"/block-distribution>heading": "Distribución de bloques en {{networkName}}",
@@ -116,9 +117,11 @@
"/about>sidebar": "Acerca de",
"/about>title": "Acerca de - Monitor de Infraestructura Blockchain de {{networkName}}",
"/about>heading": "Acerca de Antelope Tools",
+ "/about>moreDescription": "Conozca más sobre Edenia y Antelope Tools su importancia y como puede involucrarse",
"/help>sidebar": "Ayuda",
"/help>title": "Ayuda - Panel de red de {{networkName}}",
"/help>heading": "Bienvenidos al Centro de Ayuda de Antelope Tools",
+ "/help>moreDescription": "Revise como se usa el estándar bp.json, resuelva la ausencia de datos de BP y contáctenos si tiene alguna sugerencia",
"networkInformation": "Información de la red",
"tools": "Herramientas",
"docs": "Documentación",
@@ -138,6 +141,7 @@
"/>moreDescription": "Encuentre datos de redes blockchain utilizando la tecnologÃa EOSIO. Vea más redes aquÃ: https://antelope.tools/.",
"/cpu-benchmark>moreDescription": "Una visualización del uso de CPU en microsegundos por cuentas de nodos productores de bloques, con datos de uso más bajos, más altos y promedio.",
"/block-producers>moreDescription": "Una lista de los productores de bloques en la red: cuentas de blockchain registradas para ejecutar nodos en la red. Incluye información de tablas en cadena y sus archivos bp.json.",
+ "/block-producers/bpName>moreDescription": "Vea la información general del productor de bloques como el rango, recompensas y compliance.",
"/nodes>moreDescription": "Una lista de todos los nodos ejecutados por entidades que componen la red con información especÃfica como puntos finales y ubicación.",
"/endpoints>moreDescription": "Una lista actualizada de los puntos finales de la API pública proporcionada por los operadores de nodos en la red.",
"/endpoints-stats>moreDescription": "EstadÃsticas del tiempo de respuesta desde Costa Rica y la disponibilidad de los puntos finales de un productor",
@@ -248,7 +252,7 @@
"keyFormat": "Introduzca una clave ECC válida. Puede generar una usando cleos o cualquier billetera compatible."
},
"ricardianContractRoute": {
- "title": "Acuerdo de Productor de Bloques"
+ "title": "Contrato Ricardiano"
},
"aboutRoute": {
"body": {
@@ -373,7 +377,8 @@
"generalInformation": "Información General",
"organization_name": "Nombre",
"viewNodes": "Ver {{totalNodes}} nodos",
- "bpNodes": "Nodos de {{bpName}}"
+ "bpNodes": "Nodos de {{bpName}}",
+ "viewNodesProfile": "Ver Información de los Nodos"
},
"nodeCardComponent": {
"features": "CaracterÃsticas",
diff --git a/webapp/src/layouts/Dashboard.js b/webapp/src/layouts/Dashboard.js
index bbfe7de65..334440a67 100644
--- a/webapp/src/layouts/Dashboard.js
+++ b/webapp/src/layouts/Dashboard.js
@@ -27,7 +27,7 @@ const INIT_VALUES = {
dynamicTitle: '',
pathname: null,
}
-const useStyles = makeStyles((theme) => styles(theme))
+const useStyles = makeStyles(styles)
const GlobalStyle = createGlobalStyle`
html,
@@ -35,9 +35,6 @@ const GlobalStyle = createGlobalStyle`
#root {
height: 100%;
}
- body {
- background: ${(props) => props.theme.body.background};
- }
.MuiCardHeader-action .MuiIconButton-root {
padding: 4px;
width: 28px;
@@ -57,19 +54,18 @@ const Dashboard = ({ children }) => {
setMobileOpen(!mobileOpen)
}
- const removeParam = route => route.substring(0,route.lastIndexOf('/'))
+ const removeParam = route => route.substring(0, route.lastIndexOf('/'))
useEffect(() => {
- const path = location.pathname.replace(/\/$/,'') || '/'
- const route = routes.find(route =>
- route.useParams ?
- removeParam(route.path) === removeParam(path)
- :
- route.path === path
+ const path = location.pathname.replace(/\/$/, '') || '/'
+ const route = routes.find(route =>
+ route.useParams
+ ? removeParam(route.path) === removeParam(path)
+ : route.path === path,
)
-
+
if (route) {
- const pathName = route.path.replace(':','')
+ const pathName = route.path.replace(':', '')
const managementCardTitle = lacchain.dynamicTitle || ''
setRouteName({
@@ -83,7 +79,7 @@ const Dashboard = ({ children }) => {
pageTitle: t(`${pathName}>title`, {
networkName: eosConfig.networkLabel,
}),
- useConnectWallet: Boolean(route.useConnectWallet)
+ useConnectWallet: Boolean(route.useConnectWallet),
})
} else {
setRouteName(INIT_VALUES)
@@ -105,7 +101,10 @@ const Dashboard = ({ children }) => {
}
/>