-
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 (#374)
* feat(dcellar-web-ui): add connect-wallet page * fix(dcellar-web-ui): resolve issue with connect-wallet page not triggering login * fix(dcellar-web-ui): resolve issue with connect-wallet page login jump error * feat(dcellar-web-ui): add tutorial card and update logo * fix(dcellar-web-ui): opt connect wallet width * feat(dcellar-web-ui): change border color for tutorial card * docs(dcellar-web-ui): update changelog
- Loading branch information
Showing
21 changed files
with
338 additions
and
130 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
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
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.
2 changes: 1 addition & 1 deletion
2
...lar-web-ui/public/js/iconfont_v0.7.min.js → ...lar-web-ui/public/js/iconfont_v0.9.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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="40%" minW={552} paddingX={60} alignItems="center" justifyContent="center"> | ||
<ConnectWalletButton displayType="embeddedModal" /> | ||
</Flex> | ||
)} | ||
</Flex> | ||
<Footer borderTop="1px solid readable.border" /> | ||
</Box> | ||
</> | ||
); | ||
}; |
Oops, something went wrong.