-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dcellar-web-ui): add connect-wallet page
- Loading branch information
Showing
9 changed files
with
154 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
apps/dcellar-web-ui/public/images/connect-wallet/icon-cw-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions
29
apps/dcellar-web-ui/public/images/connect-wallet/icon-cw-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions
9
apps/dcellar-web-ui/public/images/connect-wallet/icon-cw-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import React from 'react'; | ||
import { GAClick } from '@/components/common/GATracker'; | ||
import { Box, Flex, Text, useMediaQuery } from '@node-real/uikit'; | ||
import { WalletKitEmbeddedModal } from '@node-real/walletkit'; | ||
import { assetPrefix } from '@/base/env'; | ||
import { Footer } from '@/components/layout/Footer'; | ||
import { Logo } from '@/components/layout/Logo'; | ||
import { ConnectWallet as ConnectWalletButton } from '@/components/ConnectWallet'; | ||
import { IconFont } from '@/components/IconFont'; | ||
|
||
const leftBg = `url(${assetPrefix}/images/connect-wallet/icon-cw-left.svg) no-repeat left 0 bottom 0`; | ||
const rightBg = `url(${assetPrefix}/images/connect-wallet/icon-cw-right.svg) no-repeat right 0 top 10%`; | ||
const bottomBg = `url(${assetPrefix}/images/connect-wallet/icon-cw-bottom.svg) no-repeat right 0% bottom 0%`; | ||
|
||
export const ConnectWallet = () => { | ||
const [isMobile] = useMediaQuery('(max-width: 767px)'); | ||
const bg = isMobile ? `${leftBg}, ${rightBg}` : `${leftBg}, ${rightBg}, ${bottomBg}`; | ||
const bodyHeight = isMobile ? 'calc(100vh - 67px)' : 'calc(100vh - 50px)'; | ||
|
||
return ( | ||
<> | ||
<Box h="100vh" w="100vw"> | ||
<Flex | ||
h={64} | ||
alignItems="center" | ||
paddingLeft={isMobile ? '20px' : '40px'} | ||
position="fixed" | ||
top={0} | ||
left={0} | ||
> | ||
<GAClick name="dc.connect_wallet.nav.logo.click"> | ||
<Logo href="/" /> | ||
</GAClick> | ||
</Flex> | ||
<Flex height={bodyHeight}> | ||
<Box | ||
flexGrow={1} | ||
alignItems="center" | ||
justifyContent="center" | ||
background={bg} | ||
backgroundSize={isMobile ? '50% auto, auto' : 'auto, auto'} | ||
backgroundColor="#f9f9f9" | ||
> | ||
<Flex h="100%" alignItems="center" justifyContent="center" paddingX={20}> | ||
<Flex flexDirection="column" maxW={509} gap={24} overflow="hidden"> | ||
<Text as="h1" fontSize={40} fontWeight={700}> | ||
BNB Greenfield Storage Console | ||
</Text> | ||
<Text as="h2" fontSize={16} color="readable.secondary"> | ||
Empower developers to quickly get started with BNB Greenfield decentralized | ||
storage and assist in the development process. | ||
</Text> | ||
{isMobile && ( | ||
<ConnectWalletButton | ||
text="Connect Wallet" | ||
w="fit-content" | ||
margin="80px auto 0" | ||
h={54} | ||
padding="8px 16px" | ||
fontWeight={600} | ||
icon={<IconFont w={24} type="wallet" />} | ||
/> | ||
)} | ||
</Flex> | ||
</Flex> | ||
</Box> | ||
{!isMobile && ( | ||
<Flex width="fit-content" paddingX={60} alignItems="center" justifyContent="center"> | ||
<WalletKitEmbeddedModal /> | ||
</Flex> | ||
)} | ||
</Flex> | ||
<Footer borderTop="1px solid readable.border" /> | ||
</Box> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { LandingPage } from '@/components/layout/LandingPage'; | ||
import { ConnectWallet } from '@/modules/connect-wallet'; | ||
import { wrapper } from '@/store'; | ||
import { ReactElement } from 'react'; | ||
|
||
export default function ConnectWalletPage() { | ||
return <ConnectWallet />; | ||
} | ||
|
||
ConnectWalletPage.getInitialProps = wrapper.getInitialAppProps(() => async () => { | ||
return { | ||
pageProps: {}, | ||
}; | ||
}); | ||
|
||
ConnectWalletPage.getLayout = (page: ReactElement) => { | ||
return <>{page}</>; | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.