diff --git a/docs/ENVS.md b/docs/ENVS.md index 55ba4a38f2..03841a418b 100644 --- a/docs/ENVS.md +++ b/docs/ENVS.md @@ -188,6 +188,7 @@ Settings for meta tags and OG tags | `burnt_fees` | Burnt fees | | `total_reward` | Total block reward | | `nonce` | Block nonce | +| `miner` | Address of block's miner or validator |   diff --git a/types/views/block.ts b/types/views/block.ts index 41d345927f..e924d6189b 100644 --- a/types/views/block.ts +++ b/types/views/block.ts @@ -4,6 +4,7 @@ export const BLOCK_FIELDS_IDS = [ 'burnt_fees', 'total_reward', 'nonce', + 'miner', ] as const; export type BlockFieldId = ArrayElement; diff --git a/ui/block/BlockDetails.tsx b/ui/block/BlockDetails.tsx index fb8b969466..f173687b8b 100644 --- a/ui/block/BlockDetails.tsx +++ b/ui/block/BlockDetails.tsx @@ -202,19 +202,21 @@ const BlockDetails = ({ query }: Props) => { ) } - - - { /* api doesn't return the block processing time yet */ } - { /* { dayjs.duration(block.minedIn, 'second').humanize(true) } */ } - + > + + { /* api doesn't return the block processing time yet */ } + { /* { dayjs.duration(block.minedIn, 'second').humanize(true) } */ } + + ) } { !isRollup && !totalReward.isEqualTo(ZERO) && !config.UI.views.block.hiddenFields?.total_reward && ( { { data.size.toLocaleString() } bytes - - { capitalize(getNetworkValidatorTitle()) } - - + { !config.UI.views.block.hiddenFields?.miner && ( + + { capitalize(getNetworkValidatorTitle()) } + + + ) } Txn { data.tx_count > 0 ? ( diff --git a/ui/blocks/BlocksTable.tsx b/ui/blocks/BlocksTable.tsx index 7540aff714..594fc98777 100644 --- a/ui/blocks/BlocksTable.tsx +++ b/ui/blocks/BlocksTable.tsx @@ -42,7 +42,8 @@ const BlocksTable = ({ data, isLoading, top, page, showSocketInfo, socketInfoNum Block Size, bytes - { capitalize(getNetworkValidatorTitle()) } + { !config.UI.views.block.hiddenFields?.miner && + { capitalize(getNetworkValidatorTitle()) } } Txn Gas used { !isRollup && !config.UI.views.block.hiddenFields?.total_reward && diff --git a/ui/blocks/BlocksTableItem.tsx b/ui/blocks/BlocksTableItem.tsx index 17c0710bbc..4dc20cb04b 100644 --- a/ui/blocks/BlocksTableItem.tsx +++ b/ui/blocks/BlocksTableItem.tsx @@ -66,12 +66,14 @@ const BlocksTableItem = ({ data, isLoading, enableTimeIncrement }: Props) => { { data.size.toLocaleString() } - - - + { !config.UI.views.block.hiddenFields?.miner && ( + + + + ) } { data.tx_count > 0 ? ( diff --git a/ui/home/LatestBlocksItem.tsx b/ui/home/LatestBlocksItem.tsx index 4dde7218db..1f8ee76a3d 100644 --- a/ui/home/LatestBlocksItem.tsx +++ b/ui/home/LatestBlocksItem.tsx @@ -66,7 +66,7 @@ const LatestBlocksItem = ({ block, isLoading }: Props) => { ) } - { !config.features.optimisticRollup.isEnabled && ( + { !config.features.optimisticRollup.isEnabled && !config.UI.views.block.hiddenFields?.miner && ( <> { getNetworkValidatorTitle() } { const title = blockQuery.data?.type === 'reorg' ? `Reorged block #${ blockQuery.data?.height }` : `Block #${ blockQuery.data?.height }`; const titleSecondRow = ( <> - - - { config.chain.verificationType === 'validation' ? 'Validated by' : 'Mined by' } - - - - + { !config.UI.views.block.hiddenFields?.miner && ( + + + { config.chain.verificationType === 'validation' ? 'Validated by' : 'Mined by' } + + + + ) } + ); diff --git a/ui/pages/Home.tsx b/ui/pages/Home.tsx index dfd6c958af..0ca90465fe 100644 --- a/ui/pages/Home.tsx +++ b/ui/pages/Home.tsx @@ -1,4 +1,4 @@ -import { Box, Heading, Flex, LightMode } from '@chakra-ui/react'; +import { Box, Heading, Flex } from '@chakra-ui/react'; import React from 'react'; import config from 'configs/app'; @@ -30,15 +30,13 @@ const Home = () => { fontWeight={ 600 } color={ config.UI.homepage.plate.textColor } > - Welcome to { config.chain.name } explorer + { config.chain.name } explorer { config.features.account.isEnabled && } - - - + diff --git a/ui/pages/__screenshots__/Home.pw.tsx_dark-color-mode_default-view---default-dark-mode-1.png b/ui/pages/__screenshots__/Home.pw.tsx_dark-color-mode_default-view---default-dark-mode-1.png index d5dbefd0d4..d6c15ecd89 100644 Binary files a/ui/pages/__screenshots__/Home.pw.tsx_dark-color-mode_default-view---default-dark-mode-1.png and b/ui/pages/__screenshots__/Home.pw.tsx_dark-color-mode_default-view---default-dark-mode-1.png differ diff --git a/ui/pages/__screenshots__/Home.pw.tsx_default_custom-hero-plate-background-default-view-1.png b/ui/pages/__screenshots__/Home.pw.tsx_default_custom-hero-plate-background-default-view-1.png index 717d7b4241..6446e988dc 100644 Binary files a/ui/pages/__screenshots__/Home.pw.tsx_default_custom-hero-plate-background-default-view-1.png and b/ui/pages/__screenshots__/Home.pw.tsx_default_custom-hero-plate-background-default-view-1.png differ diff --git a/ui/pages/__screenshots__/Home.pw.tsx_default_default-view-screen-xl-1.png b/ui/pages/__screenshots__/Home.pw.tsx_default_default-view-screen-xl-1.png index 00168bcd84..c1633fcc41 100644 Binary files a/ui/pages/__screenshots__/Home.pw.tsx_default_default-view-screen-xl-1.png and b/ui/pages/__screenshots__/Home.pw.tsx_default_default-view-screen-xl-1.png differ diff --git a/ui/pages/__screenshots__/Home.pw.tsx_default_mobile-base-view-1.png b/ui/pages/__screenshots__/Home.pw.tsx_default_mobile-base-view-1.png index bee9740801..2f23392219 100644 Binary files a/ui/pages/__screenshots__/Home.pw.tsx_default_mobile-base-view-1.png and b/ui/pages/__screenshots__/Home.pw.tsx_default_mobile-base-view-1.png differ diff --git a/ui/snippets/searchBar/SearchBarInput.tsx b/ui/snippets/searchBar/SearchBarInput.tsx index 179a01a5cf..f32be83f04 100644 --- a/ui/snippets/searchBar/SearchBarInput.tsx +++ b/ui/snippets/searchBar/SearchBarInput.tsx @@ -68,7 +68,7 @@ const SearchBarInput = ({ onChange, onSubmit, isHomepage, onFocus, onBlur, onHid onBlur={ onBlur } onFocus={ onFocus } w="100%" - backgroundColor={ isHomepage ? 'white' : bgColor } + backgroundColor={ bgColor } borderRadius={{ base: isHomepage ? 'base' : 'none', lg: 'base' }} position={{ base: isHomepage ? 'static' : 'fixed', lg: 'static' }} top={{ base: isHomepage ? 0 : 55, lg: 0 }}