diff --git a/packages/core/src/views/notify/NotificationContent.svelte b/packages/core/src/views/notify/NotificationContent.svelte index 5afedf8fa..244491cf5 100644 --- a/packages/core/src/views/notify/NotificationContent.svelte +++ b/packages/core/src/views/notify/NotificationContent.svelte @@ -53,10 +53,7 @@ .transaction-status { color: var(--notify-onboard-transaction-status, inherit); - line-height: var( - --notify-onboard-font-size-5, - var(--onboard-font-size-5, var(--font-size-5)) - ); + line-height: 24px; font-weight: 400; overflow: hidden; width: 200px; diff --git a/packages/demo/src/components/account/AccountCardItem.tsx b/packages/demo/src/components/account/AccountCardItem.tsx index 56248030e..18ca1e032 100644 --- a/packages/demo/src/components/account/AccountCardItem.tsx +++ b/packages/demo/src/components/account/AccountCardItem.tsx @@ -133,7 +133,11 @@ const AccountCardItem = styled(Component)<_AccountCardItem>(({ theme }) => { '.__item-icon-wallet': { width: 20, height: 20, - margin: '0 12px' + margin: '0 12px', + + 'svg': { + borderRadius: '40% !important' + } } }; }); diff --git a/packages/demo/src/components/account/AccountList.tsx b/packages/demo/src/components/account/AccountList.tsx index 04fe9fdb3..e90992055 100644 --- a/packages/demo/src/components/account/AccountList.tsx +++ b/packages/demo/src/components/account/AccountList.tsx @@ -19,6 +19,7 @@ import styled from "styled-components"; import {useNavigate} from "react-router-dom"; import {TRANSACTION_MODAL} from "../../constants/modal"; import SwAvatar from "@subwallet/react-ui/es/sw-avatar"; +import {ScreenContext} from "../../context/ScreenContext"; @@ -38,6 +39,7 @@ type AccountMapType = { const modalId = TRANSACTION_MODAL; function Component ({className, substrateProvider, evmProvider}: Props): React.ReactElement { const [{ wallet},] = useConnectWallet(); + const { isWebUI } = useContext(ScreenContext); const renderEmpty = useCallback(() => , []); const [ accountsMap, setAccountMap ] = useState([]) const navigate = useNavigate(); @@ -163,7 +165,9 @@ function Component ({className, substrateProvider, evmProvider}: Props): React.R accountsMap.length > 0 && <> ( ({theme: {token}}) => { '&.__account-list': { position: 'relative', - width: '100%' + width: '100%', + }, + + '&.-isWeb': { + marginBottom: 200 }, '.__account-item': { diff --git a/packages/demo/src/components/header/HeaderWalletInfo.tsx b/packages/demo/src/components/header/HeaderWalletInfo.tsx index 5c4cc15da..254bbcca1 100644 --- a/packages/demo/src/components/header/HeaderWalletInfo.tsx +++ b/packages/demo/src/components/header/HeaderWalletInfo.tsx @@ -85,8 +85,8 @@ export const HeaderWalletInfo = styled(Component)(({theme: {token}}) => { display: 'flex', justifyContent: 'space-between', width: '100%', - maxWidth: 1600, - padding: `${token.paddingMD + 4}px 0 `, + maxWidth: 1632, + padding: `${token.paddingMD + 4}px 16px `, position: 'fixed', marginTop: 80, backgroundColor: token.colorBgDefault, @@ -110,6 +110,8 @@ export const HeaderWalletInfo = styled(Component)(({theme: {token}}) => { '&.-isMobile': { position: 'relative', + paddingLeft: 0, + paddingRight: 0, width: '100%', marginTop: 0 }, diff --git a/packages/demo/src/components/layout/Layout.tsx b/packages/demo/src/components/layout/Layout.tsx index 7b70516a6..a37b07a40 100644 --- a/packages/demo/src/components/layout/Layout.tsx +++ b/packages/demo/src/components/layout/Layout.tsx @@ -44,6 +44,7 @@ function Component ( { className } : Props): React.ReactElement { })}> + ); @@ -54,6 +55,7 @@ const Layout = styled(Component)( ({ theme: { extendToken, token} }: Them backgroundColor: token.colorBgDefault, position: 'relative', height: '100vh', + padding: '0 16px', '.__main-content': { height: '100%', margin: 'auto', @@ -111,14 +113,10 @@ const Layout = styled(Component)( ({ theme: { extendToken, token} }: Them }, - '@media(max-width : 1660px and min-width: 768px)' : { - '.__main-layout': { - padding: '0 16px' - } - - }, '&.-isMobile':{ + padding: 0, + '.__main-content.-isConnected': { padding: `0 ${token.padding}px`, }, diff --git a/packages/demo/src/components/layout/WalletFooter.tsx b/packages/demo/src/components/layout/WalletFooter.tsx index 635f4799a..222be51df 100644 --- a/packages/demo/src/components/layout/WalletFooter.tsx +++ b/packages/demo/src/components/layout/WalletFooter.tsx @@ -1,152 +1,35 @@ import {Theme, ThemeProps} from "../../types"; -import { Button, Icon } from '@subwallet/react-ui'; -import { LightbulbFilament , Vault } from 'phosphor-react'; -import React, { useCallback } from 'react'; +import React from 'react'; import { useNavigate } from 'react-router-dom'; import styled, {useTheme} from 'styled-components'; -import {openInNewTab} from "../../utils/window"; -import {WEBSITE_URL} from "../../constants/common"; import CN from "classnames"; type Props = ThemeProps & { - visible : boolean }; -const contentOfFooter = { - title: 'Crowdloan unlock, then what?', - description: 'There\'re multiple ways you can play with your unlocked DOT, ' + - 'such as native staking, liquid staking, or lending. ' + - 'Check out SubWallet Dashboard for curated options with competitive APY to earn yield on your DOT.' -} -const Component: React.FC = ({ className, visible }: Props) => { +const Component: React.FC = ({ className }: Props) => { const navigate = useNavigate(); const { token } = useTheme() as Theme; - if(!visible){ - return ( <>> ) - } return ( - - - - - {contentOfFooter.title} - - - - {contentOfFooter.description} - - - - } - onClick={openInNewTab(WEBSITE_URL)} - > - - {'Rewards: 14.8% - 18.5%'} - {'Earn now'} - - ); }; const WalletFooter = styled(Component)(({ theme: { token } }: Props) => { return { - borderTop: `2px solid ${token.colorBgDivider}`, - display: 'flex', - gap: token.size, - flexWrap: 'wrap', - justifyContent: 'space-between', alignItems: 'flex-end', paddingTop: token.sizeLG, + position: 'fixed', width: '100%', - height: 150, + bottom: 0, + height: '1vh', paddingBottom: token.paddingMD, background: token.colorBgDefault, opacity: 1, - marginBottom: 42, - zIndex: 10, - '.__note-box': { - maxWidth: 684, - flex: '1 0 300px' - }, - '.__title-wrapper': { - display: 'flex', - alignItems: 'center', - marginBottom: token.marginXS - }, - '.__token-icon': { - color: token.colorSuccess, - fontSize: 24, - width: 40, - height: 40, - justifyContent: 'center' - }, - '.__title': { - fontSize: token.fontSizeLG, - lineHeight: token.lineHeightLG, - color: token.colorTextLight3 - }, - '.__content': { - fontSize: token.fontSize, - lineHeight: token.lineHeight, - color: token.colorTextLight4 - }, - '.__footer-button': { - height: 72, - flex: 1, - paddingRight: token.paddingSM, - paddingLeft: token.paddingSM, - gap: token.size, - maxWidth: 384 - }, - '.__footer-button-icon': { - width: 40, - height: 40, - justifyContent: 'center' - }, - '.__footer-button-content': { - textAlign: 'left' - }, - '.__footer-button-title': { - fontSize: token.fontSizeLG, - lineHeight: token.lineHeightLG, - color: token.colorTextLight1, - marginBottom: token.marginXXS - }, - '.__footer-button-subtitle': { - fontSize: token.fontSize, - lineHeight: token.lineHeight, - color: token.colorTextLight3 - }, - '@media (max-width : 767px)': { - '.__footer-button': { - minWidth: '100%' - }, - - '.__buttons-block': { - '.ant-btn': { - minWidth: '100%' - } - } - }, - + zIndex: 1 }; }); diff --git a/packages/demo/src/components/layout/WalletHeader.tsx b/packages/demo/src/components/layout/WalletHeader.tsx index 97eb3b418..fc4d47882 100644 --- a/packages/demo/src/components/layout/WalletHeader.tsx +++ b/packages/demo/src/components/layout/WalletHeader.tsx @@ -139,8 +139,8 @@ const WalletHeader = styled(Component)(({theme : {token}}) => { }, '.wallet-header-content.-isConnected': { - maxWidth: 1600, - padding: '24px 0px', + maxWidth: 1632, + padding: '24px 16px', margin: 'auto', '.__header-title': { @@ -193,7 +193,9 @@ const WalletHeader = styled(Component)(({theme : {token}}) => { '.wallet-header-content.-isConnected': { flexDirection: 'column', alignItems: 'flex-start', - gap: token.paddingSM + gap: token.paddingSM, + paddingLeft: 0, + paddingRight: 0 }, '.__header-action': { diff --git a/packages/demo/src/components/logo/LogoWithSubIcon.tsx b/packages/demo/src/components/logo/LogoWithSubIcon.tsx index 8810d3666..17a04255a 100644 --- a/packages/demo/src/components/logo/LogoWithSubIcon.tsx +++ b/packages/demo/src/components/logo/LogoWithSubIcon.tsx @@ -38,7 +38,10 @@ const LogoWithSubIcon = styled(Component)(({theme: {token}}) => { position: 'relative', width: '100%', height: '100%', - zIndex: 0 + zIndex: 0, + 'svg': { + borderRadius: '35% !important' + } }, '.__wallet-logo-sub': { diff --git a/packages/demo/src/components/sub_action/metadata/WalletMetadata.tsx b/packages/demo/src/components/sub_action/metadata/WalletMetadata.tsx index 2b36610aa..27f7c6fd1 100644 --- a/packages/demo/src/components/sub_action/metadata/WalletMetadata.tsx +++ b/packages/demo/src/components/sub_action/metadata/WalletMetadata.tsx @@ -71,7 +71,7 @@ function Component({className}: Props): React.ReactElement { eventCode: 'dbUpdateSuccess', message: `Metadata updated successfully`, type: 'success', - autoDismiss: 0 + autoDismiss: 1000 }) loadMetadata(); }) @@ -81,12 +81,10 @@ function Component({className}: Props): React.ReactElement { eventCode: 'dbUpdateSuccess', message: `${(error as Error).message.includes('Rejected') ? 'Rejected by user' : 'Add Metadata Failed or Cancelled!' }`, type: 'error', - autoDismiss: 0 + autoDismiss: 1000 }) }); - setTimeout(()=>{ - dismiss(); - }, 1500) + } }, [loadMetadata, wallet?.metadata] diff --git a/packages/demo/src/pages/EvmWalletInfo.tsx b/packages/demo/src/pages/EvmWalletInfo.tsx index 962f7bd15..1fb59ff13 100644 --- a/packages/demo/src/pages/EvmWalletInfo.tsx +++ b/packages/demo/src/pages/EvmWalletInfo.tsx @@ -84,7 +84,7 @@ function Component ({className}: Props): React.ReactElement { - {wallet?.label !== 'WalletConnect' && + {wallet?.label !== 'WalletConnect' && wallet?.label !== 'Ledger' && <> Permission