Skip to content

Commit

Permalink
Merge pull request #1358 from edenia/dev
Browse files Browse the repository at this point in the history
Production Release
  • Loading branch information
xavier506 authored Oct 25, 2023
2 parents c355773 + 133002a commit 8ad864b
Show file tree
Hide file tree
Showing 115 changed files with 1,821 additions and 1,751 deletions.
35 changes: 23 additions & 12 deletions webapp/public/style.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
.grecaptcha-badge {
width: 70px !important;
overflow: hidden !important;
transition: all 0.3s ease !important;
right: 0px !important;
bottom: 70px !important;
}

.grecaptcha-badge:hover {
width: 256px !important;
}


width: 70px !important;
overflow: hidden !important;
transition: all 0.3s ease !important;
right: 0px !important;
bottom: 70px !important;
}

.grecaptcha-badge:hover {
width: 256px !important;
}

@media (prefers-color-scheme: light) {
body {
background: #FFF;
color: #000;
}
}
@media (prefers-color-scheme: dark) {
body {
background: #051B34;
color: #FFF;
}
}
9 changes: 6 additions & 3 deletions webapp/src/components/AccountInfo/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/* eslint camelcase: 0 */
import React, { useEffect, useState } from 'react'
import { useTheme } from '@mui/material/styles'
import { makeStyles } from '@mui/styles'
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import Typography from '@mui/material/Typography'
import Identicon from 'react-identicons'
import Card from '@mui/material/Card'
import Accordion from '@mui/material/Accordion'
import AccordionSummary from '@mui/material/AccordionSummary'
import AccordionDetails from '@mui/material/AccordionDetails'
Expand Down Expand Up @@ -58,6 +60,7 @@ const AccountInfo = ({
onGetTableRows,
}) => {
const classes = useStyles()
const theme = useTheme()
const [info, setInfo] = useState(null)
const { t } = useTranslation('accountInfoComponent')

Expand Down Expand Up @@ -113,7 +116,7 @@ const AccountInfo = ({
}, [account])

return (
<div className={classes.paper}>
<Card className={classes.paper}>
{!!info && (
<>
<div className={classes.boxHeaderCard}>
Expand All @@ -122,7 +125,7 @@ const AccountInfo = ({
<Identicon
string={info.account_name || 'default'}
size={60}
fg="#757575"
fg={theme.palette.neutral.main}
/>
</div>
<Typography
Expand Down Expand Up @@ -206,7 +209,7 @@ const AccountInfo = ({
)}
</>
)}
</div>
</Card>
)
}

Expand Down
24 changes: 7 additions & 17 deletions webapp/src/components/AccountInfo/styles.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
export default (theme) => ({
paper: {
backgroundColor: theme.palette.background.paper,
boxShadow: '0px 1px 3px 1px rgba(0, 0, 0, 0.15) !important',
borderRadius: 10,
padding: theme.spacing(4),
width: '100%',
direction: 'column',
justify: 'space-between',
height: 'auto',
'&:focus': {
outline: 'none',
},
marginTop: theme.spacing(2),
justifyContent: 'space-between',
flexDirection: 'column',
},
accordion: {
boxShadow: 'none',
boxShadow: 'none !important',
width: '100%',
borderRadius: 0,
borderBottom: '1px solid rgba(0, 0, 0, 0.12)',
borderBottom: `1px solid ${theme.palette.neutral.light}`,
'& .MuiPaper-root': {
boxShadow: 'none !important',
},
},
accordionSummary: {
padding: 0,
Expand All @@ -38,10 +32,6 @@ export default (theme) => ({
minWidth: '80px',
},
},
keyIcon: {
marginRight: theme.spacing(1),
color: 'rgba(0, 0, 0, 0.54)',
},
keyLabel: {
wordBreak: 'break-all',
},
Expand Down Expand Up @@ -101,11 +91,11 @@ export default (theme) => ({
},
border: {
[theme.breakpoints.up('lg')]: {
borderLeft: '1px solid rgba(0, 0, 0, 0.2)',
borderLeft: `1px solid ${theme.palette.neutral.light}`,
},
},
iconBorder: {
backgroundColor: '#f0f0f0',
backgroundColor: theme.palette.neutral.lighter,
borderRadius: 50,
width: 85,
height: 85,
Expand Down
95 changes: 95 additions & 0 deletions webapp/src/components/ChartHeader/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import React from 'react'
import clsx from 'clsx'
import { makeStyles } from '@mui/styles'
import { useTranslation } from 'react-i18next'
import PropTypes from 'prop-types'
import Select from '@mui/material/Select'
import MenuItem from '@mui/material/MenuItem'
import FormControl from '@mui/material/FormControl'
import InputLabel from '@mui/material/InputLabel'
import Typography from '@mui/material/Typography'

import PauseButton from '../../components/PauseButton'

import styles from './styles'

const useStyles = makeStyles(styles)

const ChartHeader = ({
title,
options,
value,
isHistoryEnabled,
isLive,
isPaused,
onSelect,
handlePause,
ariaLabel,
}) => {
const classes = useStyles()
const { t } = useTranslation()

return (
<div className={classes.headerContainer}>
<Typography component="p" variant="h6">
{title}
</Typography>
<div
className={clsx(classes.formControl, {
[classes.onlySelect]: isHistoryEnabled && !handlePause,
})}
>
<FormControl>
{isHistoryEnabled && (
<>
<InputLabel htmlFor={ariaLabel}>{t('timeFrame')}</InputLabel>
<Select
inputProps={{ id: ariaLabel }}
value={value}
onChange={(e) => onSelect(e.target.value)}
fullWidth
>
{options.map((item, index) => (
<MenuItem key={index} value={item}>
{t(item)}
</MenuItem>
))}
</Select>
</>
)}
</FormControl>
{handlePause && (
<PauseButton
handlePause={handlePause}
isPaused={isPaused}
isEnabled={isLive}
/>
)}
</div>
</div>
)
}

ChartHeader.propTypes = {
ariaLabel: PropTypes.string,
title: PropTypes.string,
isPaused: PropTypes.bool,
handlePause: PropTypes.func,
value: PropTypes.string,
options: PropTypes.array,
isLive: PropTypes.bool,
isHistoryEnabled: PropTypes.bool,
onSelect: PropTypes.func,
}

ChartHeader.defaultProps = {
title: '',
ariaLabel: '',
isPaused: false,
isLive: false,
isHistoryEnabled: false,
handlePause: undefined,
onSelect: undefined,
}

export default ChartHeader
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export default (theme) => ({
headerTransactionLine: {
headerContainer: {
display: 'flex',
justifyContent: 'space-between',
flexDirection: 'column',
alignItems: 'baseline',
padding: theme.spacing(1),
[theme.breakpoints.up('lg')]: {
[theme.breakpoints.up('md')]: {
justifyContent: 'space-between',
alignItems: 'center',
flexDirection: 'row',
Expand All @@ -30,7 +30,7 @@ export default (theme) => ({
marginTop: theme.spacing(3),
},
},
cardShadow: {
boxShadow: '0px 1px 3px 1px rgba(0, 0, 0, 0.15) !important',
},
onlySelect: {
width: 150,
}
})
2 changes: 1 addition & 1 deletion webapp/src/components/ContractTables/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default (theme) => ({
},
},
tableCell: {
borderBottom: '1px solid rgba(0, 0, 0, 0.12)',
borderBottom: `1px solid ${theme.palette.neutral.light}`,
},
loadMore: {
display: 'flex',
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/EmptyState/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const EmptyState = () => {
component={RouterLink}
to="/undiscoverable-bps"
variant="contained"
color="secondary"
color="primary"
mt={2}
>
{t('viewList')}
Expand Down
7 changes: 3 additions & 4 deletions webapp/src/components/EmptyState/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ export default (theme) => ({
flexDirection: 'column',
alignItems: 'center',
width: '100%',
'& a': {
color: theme.palette.primary.main,
textDecorationColor: theme.palette.primary.main,
},
},
emptyStateContainer: {
'& span': {
Expand All @@ -26,6 +22,9 @@ export default (theme) => ({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
'& svg': {
color: theme.palette.error.light
},
'& span': {
marginTop: theme.spacing(1),
},
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/components/EndpointsTable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ const EndpointsTable = ({ producers, textLists }) => {
>
{producer.name}
</Link>
{!!producer.endpoints.api.length +
producer.endpoints.ssl.length && (
{(producer.endpoints.api.length +
producer.endpoints.ssl.length) > 0 && (
<MUITooltip title={t('linkToStats')} arrow>
<Link
aria-label={`Link to endpoints stats of ${producer.name}`}
Expand Down
15 changes: 8 additions & 7 deletions webapp/src/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import { makeStyles } from '@mui/styles'
import { List, ListItemText, ListItem } from '@mui/material'
import { useTranslation } from 'react-i18next'
import Link from '@mui/material/Link'

import { generalConfig } from '../../config'

Expand Down Expand Up @@ -33,22 +34,22 @@ const Footer = () => {

<div className={classes.gridFooter}>
<div className={classes.midText}>{t('footer1')}</div>
<a
className={classes.noUnderline}
<Link
underline="none"
href="https://edenia.com/"
target="_blank"
rel="noopener noreferrer"
>
<div className={classes.midFooter}>
{t('footer2')}
<img
alt="antelope tools dashboard"
alt="Edenia website"
src={'/edenia.webp'}
className={classes.imgHeaderLogo}
loading="lazy"
/>
</div>
</a>
</Link>
</div>

<div className={classes.footerAlign}>
Expand All @@ -71,14 +72,14 @@ const Footer = () => {
<ListItem>
<ListItemText
primary={
<a
className={classes.noUnderline}
<Link
underline="none"
href="https://github.com/edenia/antelope-tools/issues/new/choose"
target="_blank"
rel="noopener noreferrer"
>
{t('bugRequest')}
</a>
</Link>
}
/>
</ListItem>
Expand Down
Loading

0 comments on commit 8ad864b

Please sign in to comment.