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
ed2e5189
Commit
ed2e5189
authored
Jan 27, 2025
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix modal behaviour
parent
bb7df432
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
RewardsLoginModal.tsx
ui/rewards/login/RewardsLoginModal.tsx
+1
-1
AuthModal.tsx
ui/snippets/auth/AuthModal.tsx
+1
-1
UserProfileButton.tsx
ui/snippets/user/profile/UserProfileButton.tsx
+3
-2
UserProfileDesktop.tsx
ui/snippets/user/profile/UserProfileDesktop.tsx
+1
-1
No files found.
ui/rewards/login/RewardsLoginModal.tsx
View file @
ed2e5189
...
@@ -64,7 +64,7 @@ const RewardsLoginModal = () => {
...
@@ -64,7 +64,7 @@ const RewardsLoginModal = () => {
<
DialogRoot
<
DialogRoot
open=
{
isLoginModalOpen
&&
!
isWalletModalOpen
&&
!
authModal
.
open
}
open=
{
isLoginModalOpen
&&
!
isWalletModalOpen
&&
!
authModal
.
open
}
onOpenChange=
{
handleOpenChange
}
onOpenChange=
{
handleOpenChange
}
size=
{
{
base
:
'
full
'
,
lg
:
isLoginStep
?
'
sm
'
:
'
md
'
}
}
size=
{
{
lgDown
:
'
full
'
,
lg
:
isLoginStep
?
'
sm
'
:
'
md
'
}
}
>
>
<
DialogContent
>
<
DialogContent
>
<
DialogHeader
>
<
DialogHeader
>
...
...
ui/snippets/auth/AuthModal.tsx
View file @
ed2e5189
...
@@ -170,7 +170,7 @@ const AuthModal = ({ initialScreen, onClose, mixpanelConfig, closeOnError }: Pro
...
@@ -170,7 +170,7 @@ const AuthModal = ({ initialScreen, onClose, mixpanelConfig, closeOnError }: Pro
<
DialogRoot
<
DialogRoot
open
open
onOpenChange=
{
onModalOpenChange
}
onOpenChange=
{
onModalOpenChange
}
size=
{
{
base
:
'
full
'
,
lg
:
'
sm
'
}
}
size=
{
{
lgDown
:
'
full
'
,
lg
:
'
sm
'
}
}
// we need to allow user interact with element outside of dialog otherwise they can't click on recaptcha
// we need to allow user interact with element outside of dialog otherwise they can't click on recaptcha
modal=
{
false
}
modal=
{
false
}
// FIXME if we allow to close on interact outside, the dialog will be closed when user click on recaptcha
// FIXME if we allow to close on interact outside, the dialog will be closed when user click on recaptcha
...
...
ui/snippets/user/profile/UserProfileButton.tsx
View file @
ed2e5189
...
@@ -24,7 +24,7 @@ interface Props {
...
@@ -24,7 +24,7 @@ interface Props {
isPending
?:
boolean
;
isPending
?:
boolean
;
}
}
const
UserProfileButton
=
({
profileQuery
,
size
,
variant
,
onClick
,
isPending
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
UserProfileButton
=
({
profileQuery
,
size
,
variant
,
onClick
,
isPending
,
...
rest
}:
Props
,
ref
:
React
.
ForwardedRef
<
HTMLButtonElement
>
)
=>
{
const
[
isFetched
,
setIsFetched
]
=
useState
(
false
);
const
[
isFetched
,
setIsFetched
]
=
useState
(
false
);
const
isMobile
=
useIsMobile
();
const
isMobile
=
useIsMobile
();
...
@@ -87,6 +87,7 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }:
...
@@ -87,6 +87,7 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }:
px=
{
dataExists
?
2.5
:
4
}
px=
{
dataExists
?
2.5
:
4
}
fontWeight=
{
dataExists
?
700
:
600
}
fontWeight=
{
dataExists
?
700
:
600
}
loading=
{
isButtonLoading
}
loading=
{
isButtonLoading
}
{
...
rest
}
>
>
{
content
}
{
content
}
</
Button
>
</
Button
>
...
@@ -94,4 +95,4 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }:
...
@@ -94,4 +95,4 @@ const UserProfileButton = ({ profileQuery, size, variant, onClick, isPending }:
);
);
};
};
export
default
React
.
memo
(
React
.
forwardRef
(
UserProfileButton
)
);
export
default
React
.
forwardRef
(
UserProfileButton
);
ui/snippets/user/profile/UserProfileDesktop.tsx
View file @
ed2e5189
...
@@ -73,7 +73,7 @@ const UserProfileDesktop = ({ buttonSize, buttonVariant = 'header' }: Props) =>
...
@@ -73,7 +73,7 @@ const UserProfileDesktop = ({ buttonSize, buttonVariant = 'header' }: Props) =>
return
(
return
(
<>
<>
<
PopoverRoot
positioning=
{
{
placement
:
'
bottom-end
'
}
}
lazyMount
open=
{
profileMenu
.
open
}
onOpenChange=
{
handleOpenChange
}
>
<
PopoverRoot
positioning=
{
{
placement
:
'
bottom-end
'
}
}
open=
{
profileMenu
.
open
}
onOpenChange=
{
handleOpenChange
}
>
<
PopoverTrigger
>
<
PopoverTrigger
>
<
UserProfileButton
<
UserProfileButton
profileQuery=
{
profileQuery
}
profileQuery=
{
profileQuery
}
...
...
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