Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Vũ Hoàng Anh
canifa_note
Commits
f09897e4
Commit
f09897e4
authored
Jul 17, 2025
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dialog state
parent
6119a4b9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
8 deletions
+24
-8
ChangeMemberPasswordDialog.tsx
web/src/components/ChangeMemberPasswordDialog.tsx
+1
-5
CreateIdentityProviderDialog.tsx
web/src/components/CreateIdentityProviderDialog.tsx
+1
-1
CreateShortcutDialog.tsx
web/src/components/CreateShortcutDialog.tsx
+13
-1
CreateUserDialog.tsx
web/src/components/CreateUserDialog.tsx
+9
-1
No files found.
web/src/components/ChangeMemberPasswordDialog.tsx
View file @
f09897e4
import
{
use
Effect
,
use
State
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Dialog
,
DialogContent
,
DialogFooter
,
DialogHeader
,
DialogTitle
}
from
"@/components/ui/dialog"
;
import
{
Dialog
,
DialogContent
,
DialogFooter
,
DialogHeader
,
DialogTitle
}
from
"@/components/ui/dialog"
;
...
@@ -20,10 +20,6 @@ function ChangeMemberPasswordDialog({ open, onOpenChange, user, onSuccess }: Pro
...
@@ -20,10 +20,6 @@ function ChangeMemberPasswordDialog({ open, onOpenChange, user, onSuccess }: Pro
const
[
newPassword
,
setNewPassword
]
=
useState
(
""
);
const
[
newPassword
,
setNewPassword
]
=
useState
(
""
);
const
[
newPasswordAgain
,
setNewPasswordAgain
]
=
useState
(
""
);
const
[
newPasswordAgain
,
setNewPasswordAgain
]
=
useState
(
""
);
useEffect
(()
=>
{
// do nth
},
[]);
const
handleCloseBtnClick
=
()
=>
{
const
handleCloseBtnClick
=
()
=>
{
onOpenChange
(
false
);
onOpenChange
(
false
);
};
};
...
...
web/src/components/CreateIdentityProviderDialog.tsx
View file @
f09897e4
...
@@ -142,7 +142,7 @@ function CreateIdentityProviderDialog({ open, onOpenChange, identityProvider, on
...
@@ -142,7 +142,7 @@ function CreateIdentityProviderDialog({ open, onOpenChange, identityProvider, on
setOAuth2Scopes
(
oauth2Config
.
scopes
.
join
(
" "
));
setOAuth2Scopes
(
oauth2Config
.
scopes
.
join
(
" "
));
}
}
}
}
},
[]);
},
[
identityProvider
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
isCreating
)
{
if
(
!
isCreating
)
{
...
...
web/src/components/CreateShortcutDialog.tsx
View file @
f09897e4
import
React
,
{
useState
}
from
"react"
;
import
React
,
{
use
Effect
,
use
State
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Dialog
,
DialogContent
,
DialogFooter
,
DialogHeader
,
DialogTitle
}
from
"@/components/ui/dialog"
;
import
{
Dialog
,
DialogContent
,
DialogFooter
,
DialogHeader
,
DialogTitle
}
from
"@/components/ui/dialog"
;
...
@@ -30,6 +30,18 @@ function CreateShortcutDialog({ open, onOpenChange, shortcut: initialShortcut, o
...
@@ -30,6 +30,18 @@ function CreateShortcutDialog({ open, onOpenChange, shortcut: initialShortcut, o
const
requestState
=
useLoading
(
false
);
const
requestState
=
useLoading
(
false
);
const
isCreating
=
!
initialShortcut
;
const
isCreating
=
!
initialShortcut
;
useEffect
(()
=>
{
if
(
initialShortcut
)
{
setShortcut
({
name
:
initialShortcut
.
name
,
title
:
initialShortcut
.
title
,
filter
:
initialShortcut
.
filter
,
});
}
else
{
setShortcut
({
name
:
""
,
title
:
""
,
filter
:
""
});
}
},
[
initialShortcut
]);
const
onShortcutTitleChange
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
const
onShortcutTitleChange
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
setShortcut
({
...
shortcut
,
title
:
e
.
target
.
value
});
setShortcut
({
...
shortcut
,
title
:
e
.
target
.
value
});
};
};
...
...
web/src/components/CreateUserDialog.tsx
View file @
f09897e4
import
{
useState
}
from
"react"
;
import
{
use
Effect
,
use
State
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Dialog
,
DialogContent
,
DialogFooter
,
DialogHeader
,
DialogTitle
}
from
"@/components/ui/dialog"
;
import
{
Dialog
,
DialogContent
,
DialogFooter
,
DialogHeader
,
DialogTitle
}
from
"@/components/ui/dialog"
;
...
@@ -23,6 +23,14 @@ function CreateUserDialog({ open, onOpenChange, user: initialUser, onSuccess }:
...
@@ -23,6 +23,14 @@ function CreateUserDialog({ open, onOpenChange, user: initialUser, onSuccess }:
const
requestState
=
useLoading
(
false
);
const
requestState
=
useLoading
(
false
);
const
isCreating
=
!
initialUser
;
const
isCreating
=
!
initialUser
;
useEffect
(()
=>
{
if
(
initialUser
)
{
setUser
(
User
.
fromPartial
(
initialUser
));
}
else
{
setUser
(
User
.
fromPartial
({}));
}
},
[
initialUser
]);
const
setPartialUser
=
(
state
:
Partial
<
User
>
)
=>
{
const
setPartialUser
=
(
state
:
Partial
<
User
>
)
=>
{
setUser
({
setUser
({
...
user
,
...
user
,
...
...
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