Skip to content

Commit

Permalink
Merge pull request #5 from codingknite/explorer-pt3
Browse files Browse the repository at this point in the history
chore: explorer changes pt3
  • Loading branch information
xylophonez authored Jul 1, 2024
2 parents 946e1fc + 5337c97 commit 09d8bd3
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 51 deletions.
3 changes: 2 additions & 1 deletion configs/app/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ const defaultColorTheme = (() => {
})();

// eslint-disable-next-line max-len
const HOMEPAGE_PLATE_BACKGROUND_DEFAULT = 'radial-gradient(103.03% 103.03% at 0% 0%, rgba(183, 148, 244, 0.8) 0%, rgba(0, 163, 196, 0.8) 100%), var(--chakra-colors-blue-400)';
const HOMEPAGE_PLATE_BACKGROUND_DEFAULT =
'radial-gradient(103.03% 103.03% at 0% 0%, rgba(0, 228, 146, 0.8) 0%, rgba(0, 150, 96, 0.8) 100%), var(--chakra-colors-green-700)';

const UI = Object.freeze({
sidebar: {
Expand Down
3 changes: 3 additions & 0 deletions icons/networks/wvm-logo-dark-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/icons/name.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
| "networks/logo-placeholder"
| "networks/wvm-icon-dark"
| "networks/wvm-icon-light-2"
| "networks/wvm-logo-dark-2"
| "networks/wvm-logo-dark"
| "networks/wvm-logo-light"
| "nft_shield"
Expand Down
8 changes: 4 additions & 4 deletions theme/components/Button/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ const variantOutline = defineStyle((props) => {
const activeBg = isGrayTheme ? mode('blue.50', 'gray.600')(props) : mode(`${ c }.50`, 'gray.600')(props);
const activeColor = (() => {
if (c === 'gray') {
return mode('blue.600', 'gray.50')(props);
return mode('brand.600', 'gray.50')(props);
}
if (c === 'gray-dark') {
return mode('blue.600', 'gray.50')(props);
return mode('brand.600', 'gray.50')(props);
}
if (c === 'blue') {
return mode('blue.600', 'gray.50')(props);
return mode('brand.600', 'gray.50')(props);
}
return 'blue.600';
return 'brand.600';
})();

return {
Expand Down
2 changes: 1 addition & 1 deletion theme/components/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const baseStyleItem = defineStyle({
},
},
_hover: {
[$bg.variable]: 'colors.blue.50',
[$bg.variable]: 'colors.brand.50',
_dark: {
[$bg.variable]: 'colors.whiteAlpha.100',
},
Expand Down
8 changes: 4 additions & 4 deletions theme/components/Tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const variantSoftRounded = definePartsStyle((props) => {
tab: {
borderRadius: 'base',
fontWeight: '600',
color: mode('blue.700', 'gray.400')(props),
color: mode('brand.700', 'gray.400')(props),
_selected: {
color: mode('blue.700', 'gray.50')(props),
bg: mode('blue.50', 'gray.800')(props),
color: mode('brand.700', 'gray.50')(props),
bg: mode('brand.50', 'gray.800')(props),
_hover: {
color: mode('blue.700', 'gray.50')(props),
color: mode('brand.700', 'gray.50')(props),
},
},
_hover: {
Expand Down
4 changes: 2 additions & 2 deletions theme/components/Tooltip/Tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const $arrowBg = cssVar('popper-arrow-bg');

const variantNav = defineStyle((props) => {
return {
bg: mode('blue.50', 'gray.800')(props),
color: 'blue.400',
bg: mode('brand.50', 'gray.800')(props),
color: 'brand.400',
padding: '15px 12px',
minWidth: '120px',
borderRadius: 'base',
Expand Down
12 changes: 12 additions & 0 deletions theme/foundations/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
const colors = {
brand: {
'50': '#edfff8',
'100': '#d5fff0',
'200': '#aeffe2',
'300': '#70ffcd',
'400': '#2bfdb1',
'500': '#00e492',
'600': '#00c076',
'700': '#009660',
'800': '#06754e',
'900': '#076042',
},
green: {
'100': '#C6F6D5',
'400': '#48BB78',
Expand Down
6 changes: 3 additions & 3 deletions theme/foundations/semanticTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const semanticTokens = {
_dark: 'gray.400',
},
link: {
'default': 'blue.600',
_dark: 'blue.300',
'default': 'brand.600',
_dark: 'brand.400',
},
link_hovered: {
'default': 'blue.400',
'default': 'brand.700',
},
error: {
'default': 'red.400',
Expand Down
4 changes: 2 additions & 2 deletions theme/globals/address-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ const styles = (props: StyleFunctionProps) => {
width: `100%`,
height: '100%',
borderRadius: 'base',
borderColor: mode('blue.200', 'blue.600')(props),
borderColor: mode('brand.200', 'brand.600')(props),
borderWidth: '1px',
borderStyle: 'dashed',
bgColor: mode('blue.50', 'blue.900')(props),
bgColor: mode('brand.50', 'brand.900')(props),
zIndex: -1,
},
},
Expand Down
1 change: 1 addition & 0 deletions ui/address/contract/ContractCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const ContractCode = ({ addressHash, contractQuery, channel }: Props) => {
ml={ data?.is_partially_verified ? 0 : 'auto' }
flexShrink={ 0 }
as="a"
colorScheme="brand"
href={ route({ pathname: '/address/[hash]/contract-verification', query: { hash: addressHash || '' } }) }
>
Verify & publish
Expand Down
1 change: 1 addition & 0 deletions ui/contractVerification/ContractVerificationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ const ContractVerificationForm = ({ method: methodFromQuery, config, hash }: Pro
mt={ 12 }
isLoading={ formState.isSubmitting }
loadingText="Verify & publish"
colorScheme="brand"
>
Verify & publish
</Button>
Expand Down
4 changes: 1 addition & 3 deletions ui/home/StatsItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import React from 'react';
import breakpoints from 'theme/foundations/breakpoints';
import type { IconName } from 'ui/shared/IconSvg';
import IconSvg from 'ui/shared/IconSvg';
import useThemeColors from 'ui/shared/monaco/utils/useThemeColors';

type Props = {
icon: IconName;
Expand All @@ -20,7 +19,6 @@ type Props = {
const LARGEST_BREAKPOINT = '1240px';

const StatsItem = ({ icon, title, value, className, tooltip, url, isLoading }: Props) => {
const themeColors = useThemeColors();

const sxContainer: SystemStyleObject = {
[`@media screen and (min-width: ${ breakpoints.lg }) and (max-width: ${ LARGEST_BREAKPOINT })`]: { flexDirection: 'column' },
Expand All @@ -30,7 +28,7 @@ const StatsItem = ({ icon, title, value, className, tooltip, url, isLoading }: P
[`@media screen and (min-width: ${ breakpoints.lg }) and (max-width: ${ LARGEST_BREAKPOINT })`]: { alignItems: 'center' },
};

const bgColor = useColorModeValue(themeColors['primary.50'], 'whiteAlpha.100');
const bgColor = useColorModeValue('brand.50', 'whiteAlpha.100');
const loadingBgColor = useColorModeValue('blackAlpha.50', 'whiteAlpha.50');

return (
Expand Down
2 changes: 1 addition & 1 deletion ui/home/indicators/ChainIndicatorChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const CHART_MARGIN = { bottom: 5, left: 10, right: 10, top: 0 };

const ChainIndicatorChart = ({ data }: Props) => {
const overlayRef = React.useRef<SVGRectElement>(null);
const lineColor = useToken('colors', 'blue.500');
const lineColor = useToken('colors', 'brand.600');

const axesConfig = React.useMemo(() => {
return {
Expand Down
1 change: 1 addition & 0 deletions ui/shared/AppError/AppError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const AppError = ({ error, className }: Props) => {
variant="outline"
as="a"
href={ route({ pathname: '/' }) }
colorScheme="brand"
>
Back to home
</Button>
Expand Down
1 change: 1 addition & 0 deletions ui/shared/AppError/custom/AppErrorTxNotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const AppErrorTxNotFound = () => {
variant="outline"
as="a"
href={ route({ pathname: '/' }) }
colorScheme="brand"
>
Back to home
</Button>
Expand Down
2 changes: 1 addition & 1 deletion ui/shared/ContentLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ContentLoader = ({ className, text }: Props) => {
animation: `${ runnerAnimation } 700ms ease-in-out infinite alternate`,
left: '100%',
top: 0,
backgroundColor: 'blue.300',
backgroundColor: 'brand.500',
borderRadius: 'full',
}}
/>
Expand Down
25 changes: 0 additions & 25 deletions ui/shared/monaco/utils/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@ export const light = {
inherit: true,
rules: [],
colors: {
// wvm color palette
'primary.50': '#edfff8',
'primary.100': '#d5fff0',
'primary.200': '#aeffe2',
'primary.300': '#70ffcd',
'primary.400': '#2bfdb1',
'primary.500': '#00e492',
'primary.600': '#00c076',
'primary.700': '#009660',
'primary.800': '#06754e',
'primary.900': '#076042',
'primary.950': '#003724',
'editor.background': '#f5f5f6',
'editorWidget.background': '#f5f5f6',

Expand Down Expand Up @@ -59,19 +47,6 @@ export const dark = {
inherit: true,
rules: [],
colors: {
// wvm color palette
'primary.50': '#edfff8',
'primary.100': '#d5fff0',
'primary.200': '#aeffe2',
'primary.300': '#70ffcd',
'primary.400': '#2bfdb1',
'primary.500': '#00e492',
'primary.600': '#00c076',
'primary.700': '#009660',
'primary.800': '#06754e',
'primary.900': '#076042',
'primary.950': '#003724',

'editor.background': '#1a1b1b',
'editorWidget.background': '#1a1b1b',

Expand Down
2 changes: 1 addition & 1 deletion ui/snippets/networkMenu/NetworkLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const LogoFallback = ({

const logoPath =
colorMode === 'light' ?
'networks/wvm-logo-dark' :
'networks/wvm-logo-dark-2' :
'networks/wvm-logo-light';

const display = isSmall ?
Expand Down
4 changes: 3 additions & 1 deletion ui/snippets/profileMenu/ProfileMenuDesktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const ProfileMenuDesktop = ({ isHomePage, className, fallbackIconSize }: Props)
aria-label="profile menu"
icon={ <UserAvatar size={ 20 } fallbackIconSize={ fallbackIconSize }/> }
variant={ variant }
colorScheme="blue"
bg="brand.900"
_hover={{ bg: 'brand.800' }}
_active={{ bg: 'brand.800' }}
boxSize="40px"
flexShrink={ 0 }
{ ...iconButtonProps }
Expand Down
6 changes: 4 additions & 2 deletions ui/snippets/walletMenu/WalletMenuDesktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const WalletMenuDesktop = ({ isHomePage, className, size = 'md' }: Props) => {
const backgroundColor = isAutoConnectDisabled ? themedBackgroundOrange : themedBackground;
const color = isAutoConnectDisabled ? themedColorForOrangeBg : themedColor;
buttonStyles = {
bg: isHomePage ? 'blue.50' : backgroundColor,
bg: isHomePage ? 'brand.50' : backgroundColor,
color: isHomePage ? 'blackAlpha.800' : color,
_hover: {
color: isHomePage ? 'blackAlpha.800' : color,
Expand Down Expand Up @@ -80,7 +80,9 @@ const WalletMenuDesktop = ({ isHomePage, className, size = 'md' }: Props) => {
<Button
className={ className }
variant={ variant }
colorScheme="blue"
bg="brand.900"
_hover={{ bg: 'brand.800' }}
_active={{ bg: 'brand.800' }}
flexShrink={ 0 }
isLoading={ (isModalOpening || isModalOpen) && !isWalletConnected }
loadingText="Connect wallet"
Expand Down

0 comments on commit 09d8bd3

Please sign in to comment.