diff --git a/packages/popup/src/App.js b/packages/popup/src/App.js index 43ca91b1..184dceca 100644 --- a/packages/popup/src/App.js +++ b/packages/popup/src/App.js @@ -264,7 +264,7 @@ const AppRoutes = withRouter( return (
{ diff --git a/packages/popup/src/index.js b/packages/popup/src/index.js index b7194201..d9f727b5 100644 --- a/packages/popup/src/index.js +++ b/packages/popup/src/index.js @@ -16,6 +16,7 @@ if (isRunningInSidePanel()) { sidePanelSheet.insertRule(` html, body { width: 100%; + overflow: hidden; } `) document.adoptedStyleSheets = [...document.adoptedStyleSheets, sidePanelSheet] diff --git a/packages/popup/src/pages/Home/components/AccountList.js b/packages/popup/src/pages/Home/components/AccountList.js index 89cfcfad..7d1cd17d 100644 --- a/packages/popup/src/pages/Home/components/AccountList.js +++ b/packages/popup/src/pages/Home/components/AccountList.js @@ -17,7 +17,6 @@ import { } from '../../../components' import {useAccountList, useCurrentAddress} from '../../../hooks/useApi' import {RPC_METHODS, ROUTES} from '../../../constants' -import {isRunningInSidePanel} from '../../../utils/side-panel' const {WALLET_SET_CURRENT_ACCOUNT} = RPC_METHODS const {SELECT_CREATE_TYPE} = ROUTES @@ -198,7 +197,6 @@ function AccountList({onClose, open, accountsAnimate = true}) { onChangeAccount={onChangeAccount} /> } - width={isRunningInSidePanel() ? 'w-full' : undefined} /> ) : null } diff --git a/packages/popup/src/pages/Home/components/AddToken.js b/packages/popup/src/pages/Home/components/AddToken.js index 6b6e323d..9fa07ed5 100644 --- a/packages/popup/src/pages/Home/components/AddToken.js +++ b/packages/popup/src/pages/Home/components/AddToken.js @@ -29,7 +29,6 @@ import { } from '../../../hooks/useApi' import useLoading from '../../../hooks/useLoading' import {request, validateAddress} from '../../../utils' -import {isRunningInSidePanel} from '../../../utils/side-panel' const {WALLET_WATCH_ASSET, WALLET_UNWATCH_ASSET} = RPC_METHODS @@ -38,7 +37,6 @@ function AddToken({onClose, open}) { const [searchContent, setSearchContent] = useState('') const [showDeleteButtonTokenId, setShowDeleteButtonTokenId] = useState('') const [maskClosable, setMaskClosable] = useState(true) - const inSidePanel = isRunningInSidePanel() const {setLoading} = useLoading() const [debouncedSearchContent, setDebouncedSearchContent] = @@ -205,7 +203,6 @@ function AddToken({onClose, open}) { {!tokenList && }
} - width={inSidePanel ? 'w-full' : undefined} /> ) } diff --git a/packages/popup/src/pages/Home/components/NetworkList.js b/packages/popup/src/pages/Home/components/NetworkList.js index eda66458..ad8a2fe4 100644 --- a/packages/popup/src/pages/Home/components/NetworkList.js +++ b/packages/popup/src/pages/Home/components/NetworkList.js @@ -5,7 +5,6 @@ import {Link} from 'react-router-dom' import {SlideCard, NetworkContent} from '../../../components' import {ROUTES} from '../../../constants' import {usePreferences} from '../../../hooks/useApi' -import {isRunningInSidePanel} from '../../../utils/side-panel' const {ADVANCED_SETTINGS} = ROUTES @@ -45,7 +44,6 @@ function NetworkList({onClose, open}) { }} /> } - width={isRunningInSidePanel() ? 'w-full' : undefined} /> ) } diff --git a/packages/popup/src/pages/Home/index.css b/packages/popup/src/pages/Home/index.css index 44f90962..0f18eafb 100644 --- a/packages/popup/src/pages/Home/index.css +++ b/packages/popup/src/pages/Home/index.css @@ -7,6 +7,15 @@ content: ''; } +.home-container.in-side-panel::before { + @apply absolute w-[100%] h-[210px] left-[0] top-[0] bg-secondary; + + transform: unset; + border-radius: unset; + transition: none; + content: ''; +} + .home-container::after { @apply absolute left-0 top-0 bottom-0 right-0 bg-homepage-background bg-no-repeat; diff --git a/packages/popup/src/pages/Home/index.js b/packages/popup/src/pages/Home/index.js index 0322c738..97c2f903 100644 --- a/packages/popup/src/pages/Home/index.js +++ b/packages/popup/src/pages/Home/index.js @@ -33,6 +33,7 @@ import { CrossSpaceButton, } from './components' import {IS_DEV_MODE} from '@fluent-wallet/inner-utils' +import {isRunningInSidePanel} from '../../utils/side-panel' function Home() { const {t} = useTranslation() const [accountStatus, setAccountStatus] = useState(false) @@ -119,7 +120,9 @@ function Home() { return (
{/* only for dev env*/}