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
29b683d5
Commit
29b683d5
authored
Jul 09, 2025
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dialog styles
parent
e8862e3c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
UpdateCustomizedProfileDialog.tsx
web/src/components/UpdateCustomizedProfileDialog.tsx
+8
-9
dialog.tsx
web/src/components/ui/dialog.tsx
+2
-2
No files found.
web/src/components/UpdateCustomizedProfileDialog.tsx
View file @
29b683d5
import
{
useState
}
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
,
DialogDescription
,
DialogHeader
,
DialogTitle
}
from
"@/components/ui/dialog"
;
import
{
Dialog
,
DialogContent
,
DialogDescription
,
Dialog
Footer
,
Dialog
Header
,
DialogTitle
}
from
"@/components/ui/dialog"
;
import
{
Input
}
from
"@/components/ui/input"
;
import
{
Input
}
from
"@/components/ui/input"
;
import
{
Label
}
from
"@/components/ui/label"
;
import
{
Label
}
from
"@/components/ui/label"
;
import
{
Textarea
}
from
"@/components/ui/textarea"
;
import
{
Textarea
}
from
"@/components/ui/textarea"
;
...
@@ -113,7 +113,7 @@ export function UpdateCustomizedProfileDialog({ open, onOpenChange, onSuccess }:
...
@@ -113,7 +113,7 @@ export function UpdateCustomizedProfileDialog({ open, onOpenChange, onSuccess }:
<
DialogDescription
>
Customize your workspace appearance and settings.
</
DialogDescription
>
<
DialogDescription
>
Customize your workspace appearance and settings.
</
DialogDescription
>
</
DialogHeader
>
</
DialogHeader
>
<
div
className=
"grid gap-4
py-4
"
>
<
div
className=
"grid gap-4"
>
<
div
className=
"grid gap-2"
>
<
div
className=
"grid gap-2"
>
<
Label
htmlFor=
"server-name"
>
{
t
(
"setting.system-section.server-name"
)
}
</
Label
>
<
Label
htmlFor=
"server-name"
>
{
t
(
"setting.system-section.server-name"
)
}
</
Label
>
<
Input
id=
"server-name"
type=
"text"
value=
{
customProfile
.
title
}
onChange=
{
handleNameChanged
}
placeholder=
"Enter server name"
/>
<
Input
id=
"server-name"
type=
"text"
value=
{
customProfile
.
title
}
onChange=
{
handleNameChanged
}
placeholder=
"Enter server name"
/>
...
@@ -146,20 +146,19 @@ export function UpdateCustomizedProfileDialog({ open, onOpenChange, onSuccess }:
...
@@ -146,20 +146,19 @@ export function UpdateCustomizedProfileDialog({ open, onOpenChange, onSuccess }:
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"flex items-center justify-between pt-4
"
>
<
DialogFooter
className=
"flex-col sm:flex-row sm:justify-between gap-2
"
>
<
Button
variant=
"outline"
onClick=
{
handleRestoreButtonClick
}
disabled=
{
isLoading
}
>
<
Button
variant=
"outline"
onClick=
{
handleRestoreButtonClick
}
disabled=
{
isLoading
}
className=
"sm:mr-auto"
>
{
t
(
"common.restore"
)
}
{
t
(
"common.restore"
)
}
</
Button
>
</
Button
>
<
div
className=
"flex gap-2 w-full sm:w-auto"
>
<
div
className=
"flex gap-2"
>
<
Button
variant=
"ghost"
onClick=
{
handleCloseButtonClick
}
disabled=
{
isLoading
}
className=
"flex-1 sm:flex-initial"
>
<
Button
variant=
"ghost"
onClick=
{
handleCloseButtonClick
}
disabled=
{
isLoading
}
>
{
t
(
"common.cancel"
)
}
{
t
(
"common.cancel"
)
}
</
Button
>
</
Button
>
<
Button
onClick=
{
handleSaveButtonClick
}
disabled=
{
isLoading
}
>
<
Button
onClick=
{
handleSaveButtonClick
}
disabled=
{
isLoading
}
className=
"flex-1 sm:flex-initial"
>
{
isLoading
?
"Saving..."
:
t
(
"common.save"
)
}
{
isLoading
?
"Saving..."
:
t
(
"common.save"
)
}
</
Button
>
</
Button
>
</
div
>
</
div
>
</
div
>
</
DialogFooter
>
</
DialogContent
>
</
DialogContent
>
</
Dialog
>
</
Dialog
>
);
);
...
...
web/src/components/ui/dialog.tsx
View file @
29b683d5
...
@@ -45,7 +45,7 @@ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
...
@@ -45,7 +45,7 @@ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
* - full: Takes available width with margins
* - full: Takes available width with margins
*/
*/
const
dialogContentVariants
=
cva
(
const
dialogContentVariants
=
cva
(
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50
grid translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border shadow-lg duration-200
"
,
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50
flex flex-col translate-x-[-50%] translate-y-[-50%] rounded-lg border shadow-lg duration-200 max-h-[calc(100vh-2rem)] sm:max-h-[calc(100vh-3rem)] md:max-h-[calc(100vh-4rem)]
"
,
{
{
variants
:
{
variants
:
{
size
:
{
size
:
{
...
@@ -75,7 +75,7 @@ const DialogContent = React.forwardRef<
...
@@ -75,7 +75,7 @@ const DialogContent = React.forwardRef<
<
DialogPortal
>
<
DialogPortal
>
<
DialogOverlay
/>
<
DialogOverlay
/>
<
DialogPrimitive
.
Content
ref=
{
ref
}
className=
{
cn
(
dialogContentVariants
({
size
}),
className
)
}
{
...
props
}
>
<
DialogPrimitive
.
Content
ref=
{
ref
}
className=
{
cn
(
dialogContentVariants
({
size
}),
className
)
}
{
...
props
}
>
{
children
}
<
div
className=
"overflow-y-auto overflow-x-hidden flex-1 flex flex-col gap-4"
>
{
children
}
</
div
>
{
showCloseButton
&&
(
{
showCloseButton
&&
(
<
DialogPrimitive
.
Close
className=
"ring-offset-background data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
>
<
DialogPrimitive
.
Close
className=
"ring-offset-background data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
>
<
XIcon
/>
<
XIcon
/>
...
...
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