Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
658aeedd
Commit
658aeedd
authored
Sep 18, 2024
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add mobile menu
parent
149a80b7
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
16 deletions
+47
-16
HeroBanner.tsx
ui/home/HeroBanner.tsx
+1
-5
MarketplaceAppTopBar.tsx
ui/marketplace/MarketplaceAppTopBar.tsx
+0
-4
HeaderDesktop.tsx
ui/snippets/header/HeaderDesktop.tsx
+1
-1
HeaderMobile.tsx
ui/snippets/header/HeaderMobile.tsx
+2
-4
ProfileDesktop.tsx
ui/snippets/profile/ProfileDesktop.tsx
+0
-1
ProfileMenuContent.tsx
ui/snippets/profile/ProfileMenuContent.tsx
+1
-1
ProfileMobile.tsx
ui/snippets/profile/ProfileMobile.tsx
+42
-0
No files found.
ui/home/HeroBanner.tsx
View file @
658aeedd
...
@@ -4,9 +4,7 @@ import React from 'react';
...
@@ -4,9 +4,7 @@ import React from 'react';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
AdBanner
from
'
ui/shared/ad/AdBanner
'
;
import
AdBanner
from
'
ui/shared/ad/AdBanner
'
;
import
ProfileDesktop
from
'
ui/snippets/profile/ProfileDesktop
'
;
import
ProfileDesktop
from
'
ui/snippets/profile/ProfileDesktop
'
;
import
ProfileMenuDesktop
from
'
ui/snippets/profileMenu/ProfileMenuDesktop
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
WalletMenuDesktop
from
'
ui/snippets/walletMenu/WalletMenuDesktop
'
;
const
BACKGROUND_DEFAULT
=
'
radial-gradient(103.03% 103.03% at 0% 0%, rgba(183, 148, 244, 0.8) 0%, rgba(0, 163, 196, 0.8) 100%), var(--chakra-colors-blue-400)
'
;
const
BACKGROUND_DEFAULT
=
'
radial-gradient(103.03% 103.03% at 0% 0%, rgba(183, 148, 244, 0.8) 0%, rgba(0, 163, 196, 0.8) 100%), var(--chakra-colors-blue-400)
'
;
const
TEXT_COLOR_DEFAULT
=
'
white
'
;
const
TEXT_COLOR_DEFAULT
=
'
white
'
;
...
@@ -54,9 +52,7 @@ const HeroBanner = () => {
...
@@ -54,9 +52,7 @@ const HeroBanner = () => {
}
}
</
Heading
>
</
Heading
>
{
config
.
UI
.
navigation
.
layout
===
'
vertical
'
&&
(
{
config
.
UI
.
navigation
.
layout
===
'
vertical
'
&&
(
<
Box
display=
{
{
base
:
'
none
'
,
lg
:
'
flex
'
}
}
>
<
Box
display=
{
{
base
:
'
none
'
,
lg
:
'
block
'
}
}
>
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileMenuDesktop
isHomePage
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuDesktop
isHomePage
/>
}
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileDesktop
isHomePage
/>
}
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileDesktop
isHomePage
/>
}
</
Box
>
</
Box
>
)
}
)
}
...
...
ui/marketplace/MarketplaceAppTopBar.tsx
View file @
658aeedd
...
@@ -13,8 +13,6 @@ import LinkExternal from 'ui/shared/links/LinkExternal';
...
@@ -13,8 +13,6 @@ import LinkExternal from 'ui/shared/links/LinkExternal';
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
LinkInternal
from
'
ui/shared/links/LinkInternal
'
;
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
import
ProfileDesktop
from
'
ui/snippets/profile/ProfileDesktop
'
;
import
ProfileDesktop
from
'
ui/snippets/profile/ProfileDesktop
'
;
import
ProfileMenuDesktop
from
'
ui/snippets/profileMenu/ProfileMenuDesktop
'
;
import
WalletMenuDesktop
from
'
ui/snippets/walletMenu/WalletMenuDesktop
'
;
import
AppSecurityReport
from
'
./AppSecurityReport
'
;
import
AppSecurityReport
from
'
./AppSecurityReport
'
;
import
ContractListModal
from
'
./ContractListModal
'
;
import
ContractListModal
from
'
./ContractListModal
'
;
...
@@ -100,8 +98,6 @@ const MarketplaceAppTopBar = ({ appId, data, isLoading, securityReport }: Props)
...
@@ -100,8 +98,6 @@ const MarketplaceAppTopBar = ({ appId, data, isLoading, securityReport }: Props)
/>
/>
{
!
isMobile
&&
(
{
!
isMobile
&&
(
<
Flex
flex=
"1"
justifyContent=
"flex-end"
>
<
Flex
flex=
"1"
justifyContent=
"flex-end"
>
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileMenuDesktop
boxSize=
"32px"
fallbackIconSize=
{
16
}
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuDesktop
size=
"sm"
/>
}
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileDesktop
buttonSize=
"sm"
/>
}
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileDesktop
buttonSize=
"sm"
/>
}
</
Flex
>
</
Flex
>
)
}
)
}
...
...
ui/snippets/header/HeaderDesktop.tsx
View file @
658aeedd
...
@@ -38,7 +38,7 @@ const HeaderDesktop = ({ renderSearchBar, isMarketplaceAppPage }: Props) => {
...
@@ -38,7 +38,7 @@ const HeaderDesktop = ({ renderSearchBar, isMarketplaceAppPage }: Props) => {
{
searchBar
}
{
searchBar
}
</
Box
>
</
Box
>
{
config
.
UI
.
navigation
.
layout
===
'
vertical
'
&&
(
{
config
.
UI
.
navigation
.
layout
===
'
vertical
'
&&
(
<
Box
display=
"flex"
>
<
Box
display=
"flex"
flexShrink=
{
0
}
>
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileMenuDesktop
/>
}
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileMenuDesktop
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuDesktop
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuDesktop
/>
}
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileDesktop
/>
}
{
config
.
features
.
account
.
isEnabled
&&
<
ProfileDesktop
/>
}
...
...
ui/snippets/header/HeaderMobile.tsx
View file @
658aeedd
...
@@ -5,9 +5,8 @@ import { useInView } from 'react-intersection-observer';
...
@@ -5,9 +5,8 @@ import { useInView } from 'react-intersection-observer';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
{
useScrollDirection
}
from
'
lib/contexts/scrollDirection
'
;
import
{
useScrollDirection
}
from
'
lib/contexts/scrollDirection
'
;
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
import
NetworkLogo
from
'
ui/snippets/networkMenu/NetworkLogo
'
;
import
ProfileM
enuMobile
from
'
ui/snippets/profileMenu/ProfileMenu
Mobile
'
;
import
ProfileM
obile
from
'
ui/snippets/profile/Profile
Mobile
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
SearchBar
from
'
ui/snippets/searchBar/SearchBar
'
;
import
WalletMenuMobile
from
'
ui/snippets/walletMenu/WalletMenuMobile
'
;
import
Burger
from
'
./Burger
'
;
import
Burger
from
'
./Burger
'
;
...
@@ -48,8 +47,7 @@ const HeaderMobile = ({ hideSearchBar, renderSearchBar }: Props) => {
...
@@ -48,8 +47,7 @@ const HeaderMobile = ({ hideSearchBar, renderSearchBar }: Props) => {
<
Burger
/>
<
Burger
/>
<
NetworkLogo
ml=
{
2
}
mr=
"auto"
/>
<
NetworkLogo
ml=
{
2
}
mr=
"auto"
/>
<
Flex
columnGap=
{
2
}
>
<
Flex
columnGap=
{
2
}
>
{
config
.
features
.
account
.
isEnabled
?
<
ProfileMenuMobile
/>
:
<
Box
boxSize=
{
10
}
/>
}
{
config
.
features
.
account
.
isEnabled
?
<
ProfileMobile
/>
:
<
Box
boxSize=
{
10
}
/>
}
{
config
.
features
.
blockchainInteraction
.
isEnabled
&&
<
WalletMenuMobile
/>
}
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
{
!
hideSearchBar
&&
searchBar
}
{
!
hideSearchBar
&&
searchBar
}
...
...
ui/snippets/profile/ProfileDesktop.tsx
View file @
658aeedd
...
@@ -28,7 +28,6 @@ const ProfileDesktop = ({ buttonSize, isHomePage }: Props) => {
...
@@ -28,7 +28,6 @@ const ProfileDesktop = ({ buttonSize, isHomePage }: Props) => {
variant=
{
isHomePage
?
'
hero
'
:
'
header
'
}
variant=
{
isHomePage
?
'
hero
'
:
'
header
'
}
onClick=
{
profileQuery
.
data
?
profileMenu
.
onOpen
:
authModal
.
onOpen
}
onClick=
{
profileQuery
.
data
?
profileMenu
.
onOpen
:
authModal
.
onOpen
}
/>
/>
</
PopoverTrigger
>
</
PopoverTrigger
>
{
profileQuery
.
data
&&
(
{
profileQuery
.
data
&&
(
<
PopoverContent
maxW=
"280px"
minW=
"220px"
w=
"min-content"
>
<
PopoverContent
maxW=
"280px"
minW=
"220px"
w=
"min-content"
>
...
...
ui/snippets/profile/ProfileMenuContent.tsx
View file @
658aeedd
...
@@ -41,7 +41,7 @@ const navLinks: Array<NavLink> = [
...
@@ -41,7 +41,7 @@ const navLinks: Array<NavLink> = [
].
filter
(
Boolean
);
].
filter
(
Boolean
);
interface
Props
{
interface
Props
{
data
?
:
UserInfo
;
data
:
UserInfo
;
onClose
?:
()
=>
void
;
onClose
?:
()
=>
void
;
}
}
...
...
ui/snippets/profile/ProfileMobile.tsx
0 → 100644
View file @
658aeedd
import
{
Drawer
,
DrawerBody
,
DrawerContent
,
DrawerOverlay
,
useDisclosure
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
useFetchProfileInfo
from
'
lib/hooks/useFetchProfileInfo
'
;
import
AuthModal
from
'
ui/snippets/auth/AuthModal
'
;
import
ProfileButton
from
'
./ProfileButton
'
;
import
ProfileMenuContent
from
'
./ProfileMenuContent
'
;
const
ProfileMobile
=
()
=>
{
const
profileQuery
=
useFetchProfileInfo
();
const
authModal
=
useDisclosure
();
const
profileMenu
=
useDisclosure
();
return
(
<>
<
ProfileButton
profileQuery=
{
profileQuery
}
variant=
"header"
onClick=
{
profileQuery
.
data
?
profileMenu
.
onOpen
:
authModal
.
onOpen
}
/>
{
profileQuery
.
data
&&
(
<
Drawer
isOpen=
{
profileMenu
.
isOpen
}
placement=
"right"
onClose=
{
profileMenu
.
onClose
}
autoFocus=
{
false
}
>
<
DrawerOverlay
/>
<
DrawerContent
maxWidth=
"300px"
>
<
DrawerBody
p=
{
6
}
>
<
ProfileMenuContent
data=
{
profileQuery
.
data
}
onClose=
{
profileMenu
.
onClose
}
/>
</
DrawerBody
>
</
DrawerContent
>
</
Drawer
>
)
}
{
authModal
.
isOpen
&&
<
AuthModal
onClose=
{
authModal
.
onClose
}
initialScreen=
{
{
type
:
'
select_method
'
}
}
/>
}
</>
);
};
export
default
React
.
memo
(
ProfileMobile
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment