diff --git a/skale-network b/skale-network index 9dc6add..d41f6fb 160000 --- a/skale-network +++ b/skale-network @@ -1 +1 @@ -Subproject commit 9dc6add3b8e7e21576a96956df011f413c3e3c59 +Subproject commit d41f6fb3728adb318bdd869e3a2f87672cf10f2c diff --git a/src/App.scss b/src/App.scss index a5e4088..0406c80 100644 --- a/src/App.scss +++ b/src/App.scss @@ -389,6 +389,38 @@ body::-webkit-scrollbar { } +.sk-icon-btn-small { + width: 34px; + height: 34px; + + svg { + width: 18px; + height: 18px; + } +} + +.sk-icon-btn-medium { + width: 40px; + height: 40px; + + svg { + width: 24px; + height: 24px; + } +} + + +.sk-icon-btn-large { + width: 46px; + height: 46px; + + svg { + width: 32px; + height: 32px; + } +} + + .btn { text-transform: none !important; font-size: 0.8025rem !important; @@ -1387,4 +1419,9 @@ input[type=number] { .hidden { display: none; +} + +.MuiTooltip-tooltip { + font-size: 0.8rem !important; + padding: 8px 12px !important; } \ No newline at end of file diff --git a/src/components/HelpZen.tsx b/src/components/HelpZen.tsx index a094ffc..b34c708 100644 --- a/src/components/HelpZen.tsx +++ b/src/components/HelpZen.tsx @@ -2,14 +2,13 @@ import { Link } from 'react-router-dom' import { useEffect, useState, type MouseEvent } from 'react' import Box from '@mui/material/Box' -import Tooltip from '@mui/material/Tooltip' -import IconButton from '@mui/material/IconButton' import Menu from '@mui/material/Menu' import MenuItem from '@mui/material/MenuItem' import QuestionMarkRoundedIcon from '@mui/icons-material/QuestionMarkRounded' import HelpOutlineOutlinedIcon from '@mui/icons-material/HelpOutlineOutlined' import MarkUnreadChatAltRoundedIcon from '@mui/icons-material/MarkUnreadChatAltRounded' -import { cls, styles, cmn } from '@skalenetwork/metaport' +import { cmn } from '@skalenetwork/metaport' +import SkIconBtn from './SkIconBth' export default function HelpZen() { const [anchorEl, setAnchorEl] = useState(null) @@ -44,22 +43,12 @@ export default function HelpZen() { className={cmn.mleft5} sx={{ display: 'flex', alignItems: 'center', textAlign: 'center' }} > - - - - - + . + */ + +/** + * @file SkIconBth.tsx + * @copyright SKALE Labs 2024-Present + */ + +import React, { useState, useCallback } from 'react' +import IconButton, { IconButtonProps } from '@mui/material/IconButton' +import Tooltip, { TooltipProps } from '@mui/material/Tooltip' +import { SvgIconProps } from '@mui/material/SvgIcon' +import { useTheme } from '@mui/material/styles' +import useMediaQuery from '@mui/material/useMediaQuery' +import { cls, styles, cmn } from '@skalenetwork/metaport' + +type IconType = React.ComponentType + +interface SkIconBtnProps extends Omit { + icon: IconType + iconClassName?: string + tooltipTitle?: React.ReactNode + tooltipProps?: Partial + primary?: boolean +} + +const SkIconBtn: React.FC = ({ + icon: Icon, + onClick, + className, + iconClassName, + size = 'medium', + tooltipTitle, + tooltipProps, + primary = true, + ...props +}) => { + const [tooltipOpen, setTooltipOpen] = useState(false) + const theme = useTheme() + const isMobile = useMediaQuery(theme.breakpoints.down('sm')) + + const handleTooltipToggle = useCallback(() => { + if (isMobile) { + setTooltipOpen((prevOpen) => !prevOpen) + } + }, [isMobile]) + + const handleClick = useCallback( + (event: React.MouseEvent) => { + if (isMobile) { + handleTooltipToggle() + } + if (onClick) { + onClick(event) + } + }, + [isMobile, onClick, handleTooltipToggle] + ) + + const button = ( + + + + ) + + if (tooltipTitle) { + return ( + + {button} + + ) + } + + return button +} + +export default SkIconBtn diff --git a/src/components/SkPageInfoIcon.tsx b/src/components/SkPageInfoIcon.tsx new file mode 100644 index 0000000..e87c076 --- /dev/null +++ b/src/components/SkPageInfoIcon.tsx @@ -0,0 +1,43 @@ +/** + * @license + * SKALE portal + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +/** + * @file SkPageInfoIcon.tsx + * @copyright SKALE Labs 2024-Present + */ + +import React from 'react' +import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined' +import SkIconBtn from './SkIconBth' + +interface SkPageInfoIconProps { + meta_tag: any +} + +const SkPageInfoIcon: React.FC = ({ meta_tag }) => { + return ( + + ) +} + +export default SkPageInfoIcon diff --git a/src/components/chains/HubTile.tsx b/src/components/chains/HubTile.tsx index 407c451..95f9eda 100644 --- a/src/components/chains/HubTile.tsx +++ b/src/components/chains/HubTile.tsx @@ -73,12 +73,14 @@ export default function HubTile(props: {
- +
+ +
diff --git a/src/core/meta.ts b/src/core/meta.ts index 41cd6d2..bd0609c 100644 --- a/src/core/meta.ts +++ b/src/core/meta.ts @@ -33,7 +33,8 @@ export const META_TAGS = { }, bridge: { title: 'SKALE Portal - Bridge Tokens', - description: 'Bridge tokens using SKALE Bridge - Zero Gas Fees between SKALE Chains.' + description: 'Bridge tokens using SKALE Bridge - Zero Gas Fees between SKALE Chains.', + help: 'Bridge tokens between Ethereum and SKALE chains with zero gas fees.' }, history: { title: 'SKALE Portal - Bridge History', @@ -49,9 +50,9 @@ export const META_TAGS = { description: 'Explore SKALE Hubs, AppChains, connect to SKALE Chains, get block explorer links, endpoints, linked tokens and verified contracts info.' }, - apps: { - title: 'SKALE Portal - Apps', - description: 'Apps on SKALE Network. Explore and interact with dApps on SKALE Network.' + ecosystem: { + title: 'SKALE Portal - Ecosystem', + description: 'Explore and interact with dApps on SKALE Network.' }, faq: { title: 'SKALE Portal - Bridge FAQ', @@ -61,6 +62,10 @@ export const META_TAGS = { title: 'SKALE Portal - Staking', description: 'Delegate, review delegations and withdraw staking rewards' }, + validators: { + title: 'SKALE Portal - Validators', + description: 'List of validators on SKALE Network' + }, onramp: { title: 'SKALE Portal - Onramp', description: 'Purchase crypto directly on SKALE Europa Hub using the Transak onramp.' diff --git a/src/pages/Bridge.tsx b/src/pages/Bridge.tsx index 60a7526..53c90f2 100644 --- a/src/pages/Bridge.tsx +++ b/src/pages/Bridge.tsx @@ -48,6 +48,7 @@ import BridgeBody from '../components/BridgeBody' import { META_TAGS } from '../core/meta' import Meson from '../components/Meson' import { Button } from '@mui/material' +import SkPageInfoIcon from '../components/SkPageInfoIcon' interface TokenParams { keyname: string | null @@ -177,12 +178,13 @@ export default function Bridge(props: { isXs: boolean; chainsMeta: types.ChainsM +
diff --git a/src/pages/Chains.tsx b/src/pages/Chains.tsx index 5d2ef63..0a32382 100644 --- a/src/pages/Chains.tsx +++ b/src/pages/Chains.tsx @@ -39,6 +39,7 @@ import CategoryRoundedIcon from '@mui/icons-material/CategoryRounded' import ChainsSection from '../components/chains/ChainsSection' import { META_TAGS } from '../core/meta' import { MAINNET_CHAIN_NAME } from '../core/constants' +import SkPageInfoIcon from '../components/SkPageInfoIcon' export default function Chains(props: { loadData: () => Promise @@ -92,13 +93,15 @@ export default function Chains(props: { -
-

SKALE Chains

+
+
+

SKALE Chains

+

+ Connect, get block explorer links and endpoints +

+
+
-

- Connect, get block explorer links and endpoints -

- - filteredApps.some( - (filteredApp) => - filteredApp.chain === app.chain && filteredApp.appName === app.appName - ) + filteredApps.some( + (filteredApp) => + filteredApp.chain === app.chain && filteredApp.appName === app.appName ) + ) : [] ] // Favorite Apps ]) @@ -145,23 +146,26 @@ export default function Ecosystem(props: { return ( - {META_TAGS.apps.title} - - - + {META_TAGS.ecosystem.title} + + + -
+

Ecosystem

Explore dApps across the SKALE ecosystem

-
+
+
+ +
-
+
-

On-ramp

-

- Transfer your assets to SKALE Europa Hub -

+
+
+

On-ramp

+

+ Transfer your assets to SKALE Europa Hub +

+
+ +
{!isProd ? (
-
+
{loading !== false || props.customAddress !== undefined ? (
+
diff --git a/src/pages/Stats.tsx b/src/pages/Stats.tsx index 021b98b..73e8540 100644 --- a/src/pages/Stats.tsx +++ b/src/pages/Stats.tsx @@ -29,6 +29,7 @@ import { cmn, cls } from '@skalenetwork/metaport' import { DASHBOARD_URL } from '../core/constants' import { META_TAGS } from '../core/meta' +import SkPageInfoIcon from '../components/SkPageInfoIcon' export default function Stats() { return ( @@ -40,12 +41,14 @@ export default function Stats() { -
-

Stats

+
+
+

Stats

+

SKALE Network statistics

+
+
-

- SKALE Network statistics -

+