Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor(dify-ui): give AlertDialog a header part and design defaults (#44223)

yyh7057546bf36b
diff --git a/packages/dify-ui/src/alert-dialog/index.stories.tsx b/packages/dify-ui/src/alert-dialog/index.stories.tsx
index e69f06ad54a..e0cf7d15aa1 100644
--- a/packages/dify-ui/src/alert-dialog/index.stories.tsx
+++ b/packages/dify-ui/src/alert-dialog/index.stories.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '.'
@@ -24,7 +25,7 @@ const meta = {
docs: {
description: {
component:
- 'Compound alert dialog built on Base UI AlertDialog. Use it for destructive or high-risk confirmations that require an explicit user decision. Compose title, description, and actions via `AlertDialogFooter`, `AlertDialogCancelButton`, and `AlertDialogConfirmButton`.',
+ 'Compound alert dialog built on Base UI AlertDialog. Use it for destructive or high-risk confirmations that require an explicit user decision. Compose `AlertDialogTitle` and `AlertDialogDescription` in `AlertDialogHeader`, and the actions in `AlertDialogFooter` with `AlertDialogCancelButton` and `AlertDialogConfirmButton`.',
},
},
},
@@ -41,15 +42,13 @@ export const Default: Story = {
Delete project
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 p-6 pb-4">
- <AlertDialogTitle className="text-lg leading-7 font-semibold text-text-primary">
- Delete project?
- </AlertDialogTitle>
- <AlertDialogDescription className="text-sm leading-5 text-text-secondary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>Delete project?</AlertDialogTitle>
+ <AlertDialogDescription>
This action cannot be undone. All workflows, datasets, and API keys will be permanently
removed.
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton variant="secondary">Cancel</AlertDialogCancelButton>
<AlertDialogConfirmButton>Delete</AlertDialogConfirmButton>
@@ -86,15 +85,13 @@ export const NonDestructive: Story = {
Publish changes
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 p-6 pb-4">
- <AlertDialogTitle className="text-lg leading-7 font-semibold text-text-primary">
- Publish the latest draft?
- </AlertDialogTitle>
- <AlertDialogDescription className="text-sm leading-5 text-text-secondary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>Publish the latest draft?</AlertDialogTitle>
+ <AlertDialogDescription>
Collaborators will immediately see the new workflow. You can still revert from version
history.
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton variant="secondary">Not now</AlertDialogCancelButton>
<AlertDialogConfirmButton tone="default">Publish</AlertDialogConfirmButton>
@@ -104,6 +101,32 @@ export const NonDestructive: Story = {
),
}
+export const LongObjectName: Story = {
+ render: () => (
+ <AlertDialog>
+ <AlertDialogTrigger render={<button type="button" className={triggerButtonClassName} />}>
+ Delete knowledge base
+ </AlertDialogTrigger>
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ Delete “Customer support escalation playbook for enterprise accounts (2026 Q3)”?
+ </AlertDialogTitle>
+ <AlertDialogDescription>
+ {
+ 'Documents, segments, and retrieval settings will be removed.\nApps that use this knowledge base will stop retrieving from it.'
+ }
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancelButton>Cancel</AlertDialogCancelButton>
+ <AlertDialogConfirmButton>Delete</AlertDialogConfirmButton>
+ </AlertDialogFooter>
+ </AlertDialogContent>
+ </AlertDialog>
+ ),
+}
+
function ControlledDemo() {
const [open, setOpen] = React.useState(false)
const [count, setCount] = React.useState(0)
@@ -119,15 +142,13 @@ function ControlledDemo() {
</span>
<AlertDialog open={open} onOpenChange={setOpen}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 p-6 pb-4">
- <AlertDialogTitle className="text-lg leading-7 font-semibold text-text-primary">
- Revoke API token?
- </AlertDialogTitle>
- <AlertDialogDescription className="text-sm leading-5 text-text-secondary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>Revoke API token?</AlertDialogTitle>
+ <AlertDialogDescription>
Any integration using this token will immediately stop working. You can issue a new
token afterwards.
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton variant="secondary">Keep token</AlertDialogCancelButton>
<AlertDialogConfirmButton
@@ -168,15 +189,13 @@ function LoadingConfirmDemo() {
Archive workspace
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 p-6 pb-4">
- <AlertDialogTitle className="text-lg leading-7 font-semibold text-text-primary">
- Archive this workspace?
- </AlertDialogTitle>
- <AlertDialogDescription className="text-sm leading-5 text-text-secondary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>Archive this workspace?</AlertDialogTitle>
+ <AlertDialogDescription>
Members will lose access until the workspace is restored. This may take a moment to
finalize.
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton variant="secondary" disabled={pending}>
Cancel
diff --git a/packages/dify-ui/src/alert-dialog/index.tsx b/packages/dify-ui/src/alert-dialog/index.tsx
index 235c74be15e..0fe831ab394 100644
--- a/packages/dify-ui/src/alert-dialog/index.tsx
+++ b/packages/dify-ui/src/alert-dialog/index.tsx
@@ -10,8 +10,6 @@ import { modalBackdropClassName, modalPopupAnimationClassName } from '../interna
import { resolveClassName } from '../internal/resolve-class-name'
const AlertDialog = BaseAlertDialog.Root
-const AlertDialogTitle = BaseAlertDialog.Title
-const AlertDialogDescription = BaseAlertDialog.Description
const createAlertDialogHandle = BaseAlertDialog.createHandle
type AlertDialogActions = BaseAlertDialog.Root.Actions
@@ -33,9 +31,6 @@ function AlertDialogTrigger<Payload = unknown>({
/>
)
}
-type AlertDialogTitleProps = BaseAlertDialog.Title.Props
-type AlertDialogDescriptionProps = BaseAlertDialog.Description.Props
-
type AlertDialogBackdropProps = BaseAlertDialog.Backdrop.Props
function AlertDialogBackdrop({ className, ...props }: AlertDialogBackdropProps) {
@@ -77,6 +72,44 @@ function AlertDialogContent({
)
}
+type AlertDialogHeaderProps = React.ComponentProps<'div'>
+
+function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps) {
+ return <div className={cn('flex flex-col gap-2 px-6 pt-6 pb-4', className)} {...props} />
+}
+
+type AlertDialogTitleProps = BaseAlertDialog.Title.Props
+
+function AlertDialogTitle({ className, ...props }: AlertDialogTitleProps) {
+ return (
+ <BaseAlertDialog.Title
+ className={(state) =>
+ cn(
+ 'title-2xl-semi-bold wrap-break-word text-text-primary',
+ resolveClassName(className, state),
+ )
+ }
+ {...props}
+ />
+ )
+}
+
+type AlertDialogDescriptionProps = BaseAlertDialog.Description.Props
+
+function AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps) {
+ return (
+ <BaseAlertDialog.Description
+ className={(state) =>
+ cn(
+ 'system-md-regular wrap-break-word whitespace-pre-wrap text-text-secondary',
+ resolveClassName(className, state),
+ )
+ }
+ {...props}
+ />
+ )
+}
+
type AlertDialogFooterProps = React.ComponentProps<'div'>
function AlertDialogFooter({ className, ...props }: AlertDialogFooterProps) {
@@ -90,9 +123,22 @@ function AlertDialogFooter({ className, ...props }: AlertDialogFooterProps) {
type AlertDialogCancelButtonProps = ButtonProps
-function AlertDialogCancelButton({ children, ...buttonProps }: AlertDialogCancelButtonProps) {
+function AlertDialogCancelButton({
+ children,
+ className,
+ ...buttonProps
+}: AlertDialogCancelButtonProps) {
return (
- <BaseAlertDialog.Close render={<Button {...buttonProps} />}>{children}</BaseAlertDialog.Close>
+ <BaseAlertDialog.Close
+ render={
+ <Button
+ className={(state) => cn('min-w-20', resolveClassName(className, state))}
+ {...buttonProps}
+ />
+ }
+ >
+ {children}
+ </BaseAlertDialog.Close>
)
}
@@ -101,9 +147,17 @@ type AlertDialogConfirmButtonProps = ButtonProps
function AlertDialogConfirmButton({
variant = 'primary',
tone = 'destructive',
+ className,
...props
}: AlertDialogConfirmButtonProps) {
- return <Button variant={variant} tone={tone} {...props} />
+ return (
+ <Button
+ variant={variant}
+ tone={tone}
+ className={(state) => cn('min-w-20', resolveClassName(className, state))}
+ {...props}
+ />
+ )
}
export {
@@ -113,6 +167,7 @@ export {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
createAlertDialogHandle,
@@ -128,6 +183,7 @@ export type {
AlertDialogDescriptionProps,
AlertDialogFooterProps,
AlertDialogHandle,
+ AlertDialogHeaderProps,
AlertDialogProps,
AlertDialogTitleProps,
AlertDialogTriggerProps,
diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx
index 4ee376f82da..b5180f68678 100644
--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx
+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx
@@ -11,6 +11,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -708,17 +709,17 @@ const ProviderConfigModal: FC<Props> = ({
{t(($) => $['operation.remove'], { ns: 'common' })}
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $[`${I18N_PREFIX}.removeConfirmTitle`], {
ns: 'app',
key: t(($) => $[`tracing.${type}.title`], { ns: 'app' }),
})}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $[`${I18N_PREFIX}.removeConfirmContent`], { ns: 'app' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/access-rules-editor/batch-action.tsx b/web/app/components/access-rules-editor/batch-action.tsx
index ed3dbb35fb5..f811dd2f148 100644
--- a/web/app/components/access-rules-editor/batch-action.tsx
+++ b/web/app/components/access-rules-editor/batch-action.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -78,17 +79,17 @@ export default function AccessRulesBatchAction({
}}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['accessRule.batchRemoveTitle'], { ns: 'permission' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['accessRule.batchRemoveDescription'], {
ns: 'permission',
count: selectedCount,
})}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={isDeleting}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/api-key/api-key-list-content.tsx b/web/app/components/api-key/api-key-list-content.tsx
index b8399a5631b..c27ae300a74 100644
--- a/web/app/components/api-key/api-key-list-content.tsx
+++ b/web/app/components/api-key/api-key-list-content.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -86,17 +87,17 @@ export function ApiKeyListContent({
backdropProps={{ forceRender: true }}
finalFocus={() => (deleteSucceededRef.current ? finalFocus.current : true)}
>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['actionMsg.deleteConfirmTitle'], { ns: 'appApi' })}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular wrap-break-word text-text-tertiary">
+ <AlertDialogDescription>
<span className="mb-2 block font-mono" translate="no">
{payload && maskApiKey(payload.token)}
</span>
{t(($) => $['actionMsg.deleteConfirmTips'], { ns: 'appApi' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={isDeleting}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/api-key/created-api-key-dialog.tsx b/web/app/components/api-key/created-api-key-dialog.tsx
index c426f47847b..8e17583093b 100644
--- a/web/app/components/api-key/created-api-key-dialog.tsx
+++ b/web/app/components/api-key/created-api-key-dialog.tsx
@@ -5,6 +5,7 @@ import {
AlertDialogCancelButton,
AlertDialogContent,
AlertDialogDescription,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { InputGroup, InputGroupAddon, InputGroupInput } from '@langgenius/dify-ui/input-group'
@@ -40,18 +41,18 @@ export function CreatedApiKeyDialog({
initialFocus={copyButtonRef}
finalFocus={finalFocus}
backdropProps={{ forceRender: true }}
- className="overflow-hidden p-0"
+ className="overflow-hidden"
>
- <div className="flex flex-col gap-1 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['apiKeyModal.createdTitle'], { ns: 'appApi' })}
</AlertDialogTitle>
- <AlertDialogDescription className="system-sm-regular text-text-tertiary">
+ <AlertDialogDescription>
{revealOnce
? t(($) => $['apiKeyModal.revealOnceTips'], { ns: 'appApi' })
: t(($) => $['apiKeyModal.generateTips'], { ns: 'appApi' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<div className="px-6 pb-4">
<InputGroup>
<InputGroupInput
diff --git a/web/app/components/app-sidebar/app-info/app-info-modals.tsx b/web/app/components/app-sidebar/app-info/app-info-modals.tsx
index cfb2485205c..91db4c5a4d2 100644
--- a/web/app/components/app-sidebar/app-info/app-info-modals.tsx
+++ b/web/app/components/app-sidebar/app-info/app-info-modals.tsx
@@ -12,6 +12,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -136,22 +137,21 @@ const AppInfoModals = ({
>
<AlertDialogContent>
<form
- className="flex flex-col"
onSubmit={(e) => {
e.preventDefault()
if (isDeleteConfirmDisabled) return
onConfirmDelete()
}}
>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $.deleteAppConfirmTitle, { ns: 'app' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $.deleteAppConfirmContent, { ns: 'app' })}
</AlertDialogDescription>
- <Field name="confirm-app-name" className="mt-2 gap-0">
- <FieldLabel className="system-sm-regular">
+ <Field name="confirm-app-name">
+ <FieldLabel>
<Trans
i18nKey={($) => $.deleteAppConfirmInputLabel}
ns="app"
@@ -172,19 +172,18 @@ const AppInfoModals = ({
value={confirmDeleteInput}
onValueChange={setConfirmDeleteInput}
/>
- <InputGroupAddon align="inline-end" className="min-w-20 justify-end pe-1.75">
+ <InputGroupAddon align="inline-end">
<Button
variant="tertiary"
size="small"
onClick={() => setConfirmDeleteInput(appDetail.name)}
- className="rounded-full px-2.5"
>
{t(($) => $['operation.fill'], { ns: 'common' })}
</Button>
</InputGroupAddon>
</InputGroup>
</Field>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton type="button">
{t(($) => $['operation.cancel'], { ns: 'common' })}
@@ -215,14 +214,14 @@ const AppInfoModals = ({
) : (
exportDialogMode === 'warning' && (
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['sidebar.exportWarning'], { ns: 'workflow' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['sidebar.exportWarningDesc'], { ns: 'workflow' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app-sidebar/dataset-info/dropdown.tsx b/web/app/components/app-sidebar/dataset-info/dropdown.tsx
index c395bc0a748..8e26f148fcc 100644
--- a/web/app/components/app-sidebar/dataset-info/dropdown.tsx
+++ b/web/app/components/app-sidebar/dataset-info/dropdown.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -217,14 +218,12 @@ const DropDown = ({ expand, triggerClassName }: DropDownProps) => {
onOpenChange={(open) => !open && setShowConfirmDelete(false)}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $.deleteDatasetConfirmTitle, { ns: 'dataset' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {confirmMessage}
- </AlertDialogDescription>
- </div>
+ <AlertDialogDescription>{confirmMessage}</AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app-sidebar/snippet-info/dropdown.tsx b/web/app/components/app-sidebar/snippet-info/dropdown.tsx
index 0e7f00a32e9..820dccc955a 100644
--- a/web/app/components/app-sidebar/snippet-info/dropdown.tsx
+++ b/web/app/components/app-sidebar/snippet-info/dropdown.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import {
@@ -180,16 +181,12 @@ const SnippetInfoDropdown = ({ snippet }: SnippetInfoDropdownProps) => {
)}
<AlertDialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>
- <AlertDialogContent className="w-100">
- <div className="space-y-2 p-6">
- <AlertDialogTitle className="title-md-semi-bold text-text-primary">
- {t(($) => $.deleteConfirmTitle)}
- </AlertDialogTitle>
- <AlertDialogDescription className="system-sm-regular text-text-tertiary">
- {t(($) => $.deleteConfirmContent)}
- </AlertDialogDescription>
- </div>
- <AlertDialogFooter className="pt-0">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{t(($) => $.deleteConfirmTitle)}</AlertDialogTitle>
+ <AlertDialogDescription>{t(($) => $.deleteConfirmContent)}</AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
diff --git a/web/app/components/app/access-point/built-in-access-points/mcp-card.tsx b/web/app/components/app/access-point/built-in-access-points/mcp-card.tsx
index a870a805add..bcea03c2a8d 100644
--- a/web/app/components/app/access-point/built-in-access-points/mcp-card.tsx
+++ b/web/app/components/app/access-point/built-in-access-points/mcp-card.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -216,14 +217,14 @@ export function MCPAccessPointCard({
<AlertDialog open={showRegenerate} onOpenChange={(open) => !open && setShowRegenerate(false)}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['overview.appInfo.regenerate'], { ns: 'appOverview' })}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['mcp.server.reGen'], { ns: 'tools' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app/access-point/built-in-access-points/web-app-card.tsx b/web/app/components/app/access-point/built-in-access-points/web-app-card.tsx
index 7e0acf7845d..39c95a483fd 100644
--- a/web/app/components/app/access-point/built-in-access-points/web-app-card.tsx
+++ b/web/app/components/app/access-point/built-in-access-points/web-app-card.tsx
@@ -14,6 +14,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -284,14 +285,14 @@ export function WebAppAccessPointCard({
/>
<AlertDialog open={showRegenerate} onOpenChange={(open) => !open && setShowRegenerate(false)}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['overview.appInfo.regenerate'], { ns: 'appOverview' })}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['overview.appInfo.regenerateNotice'], { ns: 'appOverview' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app/access-point/deployed-environment-access-points/environment-web-app-card.tsx b/web/app/components/app/access-point/deployed-environment-access-points/environment-web-app-card.tsx
index 774dd349d02..35dce1d5732 100644
--- a/web/app/components/app/access-point/deployed-environment-access-points/environment-web-app-card.tsx
+++ b/web/app/components/app/access-point/deployed-environment-access-points/environment-web-app-card.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useMutation, useQuery, useQueryClient, useSuspenseQuery } from '@tanstack/react-query'
@@ -243,16 +244,16 @@ export function EnvironmentWebAppCard({
)}
<AlertDialog open={showRegenerate} onOpenChange={setShowRegenerate}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['overview.appInfo.regenerate'], { ns: 'appOverview' })}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['overview.appInfo.regenerateNotice'], {
ns: 'appOverview',
})}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app/annotation/batch-action.tsx b/web/app/components/app/annotation/batch-action.tsx
index c5c85432fe1..96846c72f47 100644
--- a/web/app/components/app/annotation/batch-action.tsx
+++ b/web/app/components/app/annotation/batch-action.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -69,11 +70,11 @@ const BatchAction: FC<IBatchActionProps> = ({
<span>{t(($) => $['operation.delete'], { ns: 'common' })}</span>
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['list.delete.title'], { ns: 'appAnnotation' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={isDeleting}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app/annotation/clear-all-annotations-confirm-modal/index.tsx b/web/app/components/app/annotation/clear-all-annotations-confirm-modal/index.tsx
index 1d0bf80746f..0dac59a1283 100644
--- a/web/app/components/app/annotation/clear-all-annotations-confirm-modal/index.tsx
+++ b/web/app/components/app/annotation/clear-all-annotations-confirm-modal/index.tsx
@@ -5,6 +5,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -20,14 +21,9 @@ export function ClearAllAnnotationsConfirmContent({ isPending, onConfirm }: Prop
return (
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- title={title}
- >
- {title}
- </AlertDialogTitle>
- </div>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{title}</AlertDialogTitle>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={isPending}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app/annotation/edit-annotation-modal/index.tsx b/web/app/components/app/annotation/edit-annotation-modal/index.tsx
index 2adee68ad5a..1045799af10 100644
--- a/web/app/components/app/annotation/edit-annotation-modal/index.tsx
+++ b/web/app/components/app/annotation/edit-annotation-modal/index.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -141,22 +142,16 @@ const EditAnnotationModal: FC<Props> = ({
</span>
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- title={t(($) => $['feature.annotation.removeConfirm'], {
- ns: 'appDebug',
- })}
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- >
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['feature.annotation.removeConfirm'], { ns: 'appDebug' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton
- tone="destructive"
onClick={() => {
onRemove()
removeActionsRef.current?.close()
diff --git a/web/app/components/app/annotation/remove-annotation-confirm-modal/index.tsx b/web/app/components/app/annotation/remove-annotation-confirm-modal/index.tsx
index d9b7419850f..762bfef9d77 100644
--- a/web/app/components/app/annotation/remove-annotation-confirm-modal/index.tsx
+++ b/web/app/components/app/annotation/remove-annotation-confirm-modal/index.tsx
@@ -4,6 +4,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -19,19 +20,14 @@ export function RemoveAnnotationConfirmContent({ isPending, onRemove }: Props) {
return (
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- title={title}
- >
- {title}
- </AlertDialogTitle>
- </div>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{title}</AlertDialogTitle>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={isPending}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
- <AlertDialogConfirmButton tone="destructive" loading={isPending} onClick={onRemove}>
+ <AlertDialogConfirmButton loading={isPending} onClick={onRemove}>
{t(($) => $['operation.confirm'], { ns: 'common' })}
</AlertDialogConfirmButton>
</AlertDialogFooter>
diff --git a/web/app/components/app/annotation/view-annotation-modal/index.tsx b/web/app/components/app/annotation/view-annotation-modal/index.tsx
index 3fe5b297e72..4cd6d12abe6 100644
--- a/web/app/components/app/annotation/view-annotation-modal/index.tsx
+++ b/web/app/components/app/annotation/view-annotation-modal/index.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -280,22 +281,16 @@ const ViewAnnotationModal: FC<Props> = ({ appId, isShow, onHide, item, onSave, o
</span>
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- title={t(($) => $['feature.annotation.removeConfirm'], {
- ns: 'appDebug',
- })}
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- >
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['feature.annotation.removeConfirm'], { ns: 'appDebug' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton
- tone="destructive"
onClick={async () => {
await onRemove()
removeActionsRef.current?.close()
diff --git a/web/app/components/app/app-publisher/features-wrapper.tsx b/web/app/components/app/app-publisher/features-wrapper.tsx
index cb6bba8d249..1a85f8436fb 100644
--- a/web/app/components/app/app-publisher/features-wrapper.tsx
+++ b/web/app/components/app/app-publisher/features-wrapper.tsx
@@ -12,6 +12,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { produce } from 'immer'
@@ -111,14 +112,14 @@ const FeaturesWrappedAppPublisher = (props: Props) => {
onOpenChange={(open) => !open && setRestoreConfirmOpen(false)}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['resetConfig.title'], { ns: 'appDebug' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['resetConfig.message'], { ns: 'appDebug' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app/configuration/config-var/index.tsx b/web/app/components/app/configuration/config-var/index.tsx
index 66e8a8593ee..7e7c42d913a 100644
--- a/web/app/components/app/configuration/config-var/index.tsx
+++ b/web/app/components/app/configuration/config-var/index.tsx
@@ -11,6 +11,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -400,17 +401,17 @@ const ConfigVar: FC<IConfigVarProps> = ({ promptVariables, readonly, onPromptVar
onOpenChange={(open) => !open && hideDeleteContextVarModal()}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['feature.dataSet.queryVariable.deleteContextVarTitle'], {
ns: 'appDebug',
varName: promptVariables[removeIndex as number]?.name ?? '',
})}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['feature.dataSet.queryVariable.deleteContextVarTip'], { ns: 'appDebug' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app/configuration/config/automatic/result.tsx b/web/app/components/app/configuration/config/automatic/result.tsx
index c59d657d5b4..d642d1d33d5 100644
--- a/web/app/components/app/configuration/config/automatic/result.tsx
+++ b/web/app/components/app/configuration/config/automatic/result.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -81,18 +82,18 @@ const Result: FC<Props> = ({
{t(($) => $['generate.apply'], { ns: 'appGeneration' })}
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{isGeneratorPrompt
? t(($) => $['generate.overwriteTitle'], { ns: 'appGeneration' })
: t(($) => $['codegen.overwriteConfirmTitle'], { ns: 'appGeneration' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{isGeneratorPrompt
? t(($) => $['generate.overwriteMessage'], { ns: 'appGeneration' })
: t(($) => $['codegen.overwriteConfirmMessage'], { ns: 'appGeneration' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/app/configuration/configuration-view/index.tsx b/web/app/components/app/configuration/configuration-view/index.tsx
index 17cdfd8b6c1..127369815f5 100644
--- a/web/app/components/app/configuration/configuration-view/index.tsx
+++ b/web/app/components/app/configuration/configuration-view/index.tsx
@@ -11,6 +11,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -201,23 +202,19 @@ const ConfigurationView: FC<ConfigurationViewModel> = ({
onOpenChange={(open) => !open && setShowUseGPT4Confirm(false)}
>
<AlertDialogContent>
- <div className="flex flex-col items-start gap-2 self-stretch px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['trailUseGPT4Info.title'], { ns: 'appDebug' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['trailUseGPT4Info.description'], { ns: 'appDebug' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton tone="default">
+ <AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
- <AlertDialogConfirmButton
- variant="primary"
- tone="default"
- onClick={onConfirmUseGPT4}
- >
+ <AlertDialogConfirmButton tone="default" onClick={onConfirmUseGPT4}>
{t(($) => $['operation.confirm'], { ns: 'common' })}
</AlertDialogConfirmButton>
</AlertDialogFooter>
diff --git a/web/app/components/app/create-from-dsl-modal/dsl-confirm-modal.tsx b/web/app/components/app/create-from-dsl-modal/dsl-confirm-modal.tsx
index 666b06e452b..ddc528947af 100644
--- a/web/app/components/app/create-from-dsl-modal/dsl-confirm-modal.tsx
+++ b/web/app/components/app/create-from-dsl-modal/dsl-confirm-modal.tsx
@@ -5,6 +5,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -36,15 +37,12 @@ function DSLConfirmModal({
if (!open && !confirmLoading) onCancel()
}}
>
- <AlertDialogContent className="w-120 overflow-hidden! border-none text-left align-middle shadow-xl">
- <div className="flex flex-col items-start gap-2 self-stretch p-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['newApp.appCreateDSLErrorTitle'], { ns: 'app' })}
</AlertDialogTitle>
- <AlertDialogDescription
- render={<div />}
- className="flex grow flex-col system-md-regular text-text-secondary"
- >
+ <AlertDialogDescription render={<div />}>
<div>{t(($) => $['newApp.appCreateDSLErrorPart1'], { ns: 'app' })}</div>
<div>{t(($) => $['newApp.appCreateDSLErrorPart2'], { ns: 'app' })}</div>
<br />
@@ -57,9 +55,9 @@ function DSLConfirmModal({
<span className="system-md-medium">{versions.systemVersion}</span>
</div>
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton variant="secondary" disabled={confirmLoading}>
+ <AlertDialogCancelButton disabled={confirmLoading}>
{t(($) => $['newApp.Cancel'], { ns: 'app' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton
diff --git a/web/app/components/app/deploy/environment-table/undeploy-confirm-dialog/index.tsx b/web/app/components/app/deploy/environment-table/undeploy-confirm-dialog/index.tsx
index 945e25c82b7..ffb653331b0 100644
--- a/web/app/components/app/deploy/environment-table/undeploy-confirm-dialog/index.tsx
+++ b/web/app/components/app/deploy/environment-table/undeploy-confirm-dialog/index.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -38,25 +39,23 @@ export function UndeployConfirmDialog({
if (!isPending) onOpenChange(nextOpen)
}}
>
- <AlertDialogContent className="w-120">
- <div className="flex flex-col items-start gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['studio.undeployConfirmTitle'], {
envName: environmentName,
versionName,
})}
</AlertDialogTitle>
- <AlertDialogDescription render={<div />} className="flex flex-col gap-2">
- <p className="system-md-regular text-text-secondary">
- {t(($) => $['studio.undeployConfirmDesc'])}
- </p>
+ <AlertDialogDescription>
+ {t(($) => $['studio.undeployConfirmDesc'])}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton variant="secondary" className="min-w-20" disabled={isPending}>
+ <AlertDialogCancelButton disabled={isPending}>
{tCommon(($) => $['operation.cancel'])}
</AlertDialogCancelButton>
- <AlertDialogConfirmButton className="min-w-20" loading={isPending} onClick={onConfirm}>
+ <AlertDialogConfirmButton loading={isPending} onClick={onConfirm}>
{t(($) => $['deployTab.confirmUndeploy'])}
</AlertDialogConfirmButton>
</AlertDialogFooter>
diff --git a/web/app/components/app/export-confirm-modal.tsx b/web/app/components/app/export-confirm-modal.tsx
index a8cb5c08e1c..1641ebc8e52 100644
--- a/web/app/components/app/export-confirm-modal.tsx
+++ b/web/app/components/app/export-confirm-modal.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Checkbox } from '@langgenius/dify-ui/checkbox'
@@ -40,14 +41,14 @@ export const AppExportConfirmContent = ({
}, [exportSecrets, isExporting, onClose, onConfirm])
return (
- <AlertDialogContent className="w-120">
- <div className="px-6 pt-6">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
- {t(($) => $['exportSecret.title'], { ns: 'app' })}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 mb-6 system-sm-regular text-text-secondary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{t(($) => $['exportSecret.title'], { ns: 'app' })}</AlertDialogTitle>
+ <AlertDialogDescription>
{t(($) => $['exportSecret.description'], { ns: 'app' })}
</AlertDialogDescription>
+ </AlertDialogHeader>
+ <div className="px-6">
<div className="relative">
<table className="w-full border-separate border-spacing-0 rounded-lg border border-divider-regular shadow-xs">
<thead className="system-xs-medium-uppercase text-text-tertiary">
diff --git a/web/app/components/app/switch-app-modal/index.tsx b/web/app/components/app/switch-app-modal/index.tsx
index 4f9c40ec578..c44a4fc8dc5 100644
--- a/web/app/components/app/switch-app-modal/index.tsx
+++ b/web/app/components/app/switch-app-modal/index.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -217,14 +218,12 @@ const SwitchAppModal = ({ show, sourceApp, onClose }: SwitchAppModalProps) => {
</Dialog>
<AlertDialog open={showConfirmDelete} onOpenChange={handleConfirmDeleteOpenChange}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
- {t(($) => $.deleteAppConfirmTitle, { ns: 'app' })}
- </AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>{t(($) => $.deleteAppConfirmTitle, { ns: 'app' })}</AlertDialogTitle>
+ <AlertDialogDescription>
{t(($) => $.deleteAppConfirmContent, { ns: 'app' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/apps/app-card/interactions.tsx b/web/app/components/apps/app-card/interactions.tsx
index d8169c1a266..e1d5de1599d 100644
--- a/web/app/components/apps/app-card/interactions.tsx
+++ b/web/app/components/apps/app-card/interactions.tsx
@@ -15,6 +15,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -676,16 +677,16 @@ export function AppCardInteractions({
)}
<AlertDialog open={activeDialog === 'delete'} onOpenChange={onDeleteDialogOpenChange}>
<AlertDialogContent>
- <form className="flex flex-col" onSubmit={onDeleteDialogSubmit}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <form onSubmit={onDeleteDialogSubmit}>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $.deleteAppConfirmTitle, { ns: 'app' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $.deleteAppConfirmContent, { ns: 'app' })}
</AlertDialogDescription>
- <Field name="confirm-app-name" className="mt-2">
- <FieldLabel className="system-sm-regular">
+ <Field name="confirm-app-name">
+ <FieldLabel>
<Trans
i18nKey={($) => $.deleteAppConfirmInputLabel}
ns="app"
@@ -697,7 +698,7 @@ export function AppCardInteractions({
}}
/>
</FieldLabel>
- <InputGroup className="border-components-input-border-hover">
+ <InputGroup>
<InputGroupInput
type="text"
autoComplete="off"
@@ -706,19 +707,18 @@ export function AppCardInteractions({
value={confirmDeleteInput}
onValueChange={setConfirmDeleteInput}
/>
- <InputGroupAddon align="inline-end" className="min-w-20 justify-end pe-1.75">
+ <InputGroupAddon align="inline-end">
<Button
variant="tertiary"
size="small"
onClick={() => setConfirmDeleteInput(app.name)}
- className="rounded-full px-2.5"
>
{t(($) => $['operation.fill'], { ns: 'common' })}
</Button>
</InputGroupAddon>
</InputGroup>
</Field>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton type="button" disabled={isDeleting}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx b/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx
index 4bb82b9a191..e9da8305dba 100644
--- a/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx
+++ b/web/app/components/base/chat/chat-with-history/header-in-mobile.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import {
@@ -180,14 +181,14 @@ const HeaderInMobile = () => {
</Dialog>
<AlertDialog open={!!showConfirm} onOpenChange={(open) => !open && handleCancelConfirm()}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['chat.deleteConversation.title'], { ns: 'share' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['chat.deleteConversation.content'], { ns: 'share' }) || ''}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/base/chat/chat-with-history/header/index.tsx b/web/app/components/base/chat/chat-with-history/header/index.tsx
index cc0050fba6b..16d54eb6342 100644
--- a/web/app/components/base/chat/chat-with-history/header/index.tsx
+++ b/web/app/components/base/chat/chat-with-history/header/index.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -169,14 +170,14 @@ const Header = ({ toggleButtonRef }: { toggleButtonRef?: Ref<HTMLButtonElement>
</div>
<AlertDialog open={!!showConfirm} onOpenChange={(open) => !open && handleCancelConfirm()}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['chat.deleteConversation.title'], { ns: 'share' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['chat.deleteConversation.content'], { ns: 'share' }) || ''}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/base/chat/chat-with-history/sidebar/index.tsx b/web/app/components/base/chat/chat-with-history/sidebar/index.tsx
index 623f6e34a48..1b4bd46d0b1 100644
--- a/web/app/components/base/chat/chat-with-history/sidebar/index.tsx
+++ b/web/app/components/base/chat/chat-with-history/sidebar/index.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -189,14 +190,12 @@ const Sidebar = ({ isPanel, toggleButtonRef }: Props) => {
</div>
<AlertDialog open={!!showConfirm} onOpenChange={(open) => !open && handleCancelConfirm()}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['chat.deleteConversation.title'], { ns: 'share' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {deleteConversationContent}
- </AlertDialogDescription>
- </div>
+ <AlertDialogDescription>{deleteConversationContent}</AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/dsl-confirm-modal.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/dsl-confirm-modal.tsx
index 7312f5182ae..63816312b4b 100644
--- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/dsl-confirm-modal.tsx
+++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/dsl-confirm-modal.tsx
@@ -5,6 +5,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -33,15 +34,12 @@ const DSLConfirmModal = ({
if (!open) onCancel()
}}
>
- <AlertDialogContent className="w-120 max-w-none! overflow-hidden! border-none p-6 text-left align-middle shadow-xl">
- <div className="flex flex-col items-start gap-2 self-stretch pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['newApp.appCreateDSLErrorTitle'], { ns: 'app' })}
</AlertDialogTitle>
- <AlertDialogDescription
- render={<div />}
- className="flex grow flex-col system-md-regular text-text-secondary"
- >
+ <AlertDialogDescription render={<div />}>
<div>{t(($) => $['newApp.appCreateDSLErrorPart1'], { ns: 'app' })}</div>
<div>{t(($) => $['newApp.appCreateDSLErrorPart2'], { ns: 'app' })}</div>
<br />
@@ -54,9 +52,9 @@ const DSLConfirmModal = ({
<span className="system-md-medium">{versions.systemVersion}</span>
</div>
</AlertDialogDescription>
- </div>
- <AlertDialogFooter className="items-start p-0 pt-6">
- <AlertDialogCancelButton variant="secondary">
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancelButton>
{t(($) => $['newApp.Cancel'], { ns: 'app' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton onClick={onConfirm} disabled={confirmDisabled}>
diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx
index b852f168375..a1465ee5ee3 100644
--- a/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx
+++ b/web/app/components/datasets/create-from-pipeline/list/template-card/index.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'
@@ -190,14 +191,14 @@ const TemplateCard = ({ pipeline, showMoreOperations = true, type }: TemplateCar
)}
<AlertDialog open={showDeleteConfirm} onOpenChange={(open) => !open && onCancelDelete()}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['deletePipeline.title'], { ns: 'datasetPipeline' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['deletePipeline.content'], { ns: 'datasetPipeline' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx b/web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx
index 53ae65b329d..7c399fce58c 100644
--- a/web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx
+++ b/web/app/components/datasets/create/step-two/components/indexing-mode-section.tsx
@@ -10,6 +10,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -95,17 +96,17 @@ export const IndexingModeSection: FC<IndexingModeSectionProps> = ({
if (!open) onQAConfirmDialogClose()
}}
>
- <AlertDialogContent className="w-108">
- <div className="flex flex-col gap-2 p-6 pb-4">
- <AlertDialogTitle className="text-lg/7 font-semibold text-text-primary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['stepTwo.qaSwitchHighQualityTipTitle'], { ns: 'datasetCreation' })}
</AlertDialogTitle>
- <AlertDialogDescription className="text-sm/5 text-text-secondary">
+ <AlertDialogDescription>
{t(($) => $['stepTwo.qaSwitchHighQualityTipContent'], { ns: 'datasetCreation' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton variant="secondary">
+ <AlertDialogCancelButton>
{t(($) => $['stepTwo.cancel'], { ns: 'datasetCreation' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton tone="default" onClick={onQAConfirmDialogConfirm}>
diff --git a/web/app/components/datasets/documents/components/operations.tsx b/web/app/components/datasets/documents/components/operations.tsx
index 28eb214d2d5..55ec7a075a0 100644
--- a/web/app/components/datasets/documents/components/operations.tsx
+++ b/web/app/components/datasets/documents/components/operations.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -516,14 +517,14 @@ const Operations = ({
)}
<AlertDialog open={showModal} onOpenChange={(open) => !open && setShowModal(false)}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['list.delete.title'], { ns: 'datasetDocuments' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['list.delete.content'], { ns: 'datasetDocuments' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx b/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx
index 8a13baa952a..8a5e3142d5f 100644
--- a/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx
+++ b/web/app/components/datasets/documents/detail/completed/common/batch-action.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -150,14 +151,14 @@ const BatchAction: FC<IBatchActionProps> = ({
onOpenChange={(open) => !open && hideDeleteConfirm()}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['list.delete.title'], { ns: 'datasetDocuments' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['list.delete.content'], { ns: 'datasetDocuments' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/datasets/documents/detail/completed/common/regeneration-modal.tsx b/web/app/components/datasets/documents/detail/completed/common/regeneration-modal.tsx
index aa8fdc98fa3..691ea24c044 100644
--- a/web/app/components/datasets/documents/detail/completed/common/regeneration-modal.tsx
+++ b/web/app/components/datasets/documents/detail/completed/common/regeneration-modal.tsx
@@ -24,10 +24,10 @@ const DefaultContent: FC<IDefaultContentProps> = React.memo(({ onCancel, onConfi
return (
<>
<div className="pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogTitle>
{t(($) => $['segment.regenerationConfirmTitle'], { ns: 'datasetDocuments' })}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular text-text-secondary">
+ <AlertDialogDescription>
{t(($) => $['segment.regenerationConfirmMessage'], { ns: 'datasetDocuments' })}
</AlertDialogDescription>
</div>
@@ -133,7 +133,7 @@ const RegenerationModal: FC<IRegenerationModalProps> = ({
return (
<AlertDialog open={isShow}>
- <AlertDialogContent className="w-[calc(100vw-2rem)] max-w-120! overflow-hidden! rounded-2xl! border-none p-6 text-left align-middle shadow-xl">
+ <AlertDialogContent className="overflow-hidden border-none p-6 shadow-xl">
{!loading && !updateSucceeded && (
<DefaultContent onCancel={onCancel} onConfirm={onConfirm} />
)}
diff --git a/web/app/components/datasets/documents/detail/completed/segment-card/index.tsx b/web/app/components/datasets/documents/detail/completed/segment-card/index.tsx
index 3dbc575f722..80fcb909b0a 100644
--- a/web/app/components/datasets/documents/detail/completed/segment-card/index.tsx
+++ b/web/app/components/datasets/documents/detail/completed/segment-card/index.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -318,11 +319,11 @@ const SegmentCard: FC<ISegmentCardProps> = ({
)}
<AlertDialog open={showModal} onOpenChange={(open) => !open && setShowModal(false)}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['segment.delete'], { ns: 'datasetDocuments' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/datasets/external-api/external-api-modal/index.tsx b/web/app/components/datasets/external-api/external-api-modal/index.tsx
index d971cbe1c22..14b5b27dd4b 100644
--- a/web/app/components/datasets/external-api/external-api-modal/index.tsx
+++ b/web/app/components/datasets/external-api/external-api-modal/index.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -242,17 +243,12 @@ const AddExternalAPIModal: FC<AddExternalAPIModalProps> = ({
onOpenChange={(open) => !open && setShowConfirm(false)}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- title="Warning"
- >
- Warning
- </AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>Warning</AlertDialogTitle>
+ <AlertDialogDescription>
{`${t(($) => $['editExternalAPIConfirmWarningContent.front'], { ns: 'dataset' })} ${datasetBindings?.length} ${t(($) => $['editExternalAPIConfirmWarningContent.end'], { ns: 'dataset' })}`}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/datasets/external-api/external-knowledge-api-card/index.tsx b/web/app/components/datasets/external-api/external-knowledge-api-card/index.tsx
index 05c88ed86ba..615889b6125 100644
--- a/web/app/components/datasets/external-api/external-knowledge-api-card/index.tsx
+++ b/web/app/components/datasets/external-api/external-knowledge-api-card/index.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { IconButton } from '@langgenius/dify-ui/icon-button'
@@ -146,18 +147,18 @@ const ExternalKnowledgeAPICard: React.FC<ExternalKnowledgeAPICardProps> = ({
</div>
<AlertDialog open={showConfirm} onOpenChange={(open) => !open && setShowConfirm(false)}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{`${t(($) => $['deleteExternalAPIConfirmWarningContent.title.front'], { ns: 'dataset' })} ${api.name}${t(($) => $['deleteExternalAPIConfirmWarningContent.title.end'], { ns: 'dataset' })}`}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{usageCount > 0
? `${t(($) => $['deleteExternalAPIConfirmWarningContent.content.front'], { ns: 'dataset' })} ${usageCount} ${t(($) => $['deleteExternalAPIConfirmWarningContent.content.end'], { ns: 'dataset' })}`
: t(($) => $['deleteExternalAPIConfirmWarningContent.noConnectionContent'], {
ns: 'dataset',
})}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/datasets/list/dataset-card/components/dataset-card-modals.tsx b/web/app/components/datasets/list/dataset-card/components/dataset-card-modals.tsx
index 81afe66dd18..45edcb4a971 100644
--- a/web/app/components/datasets/list/dataset-card/components/dataset-card-modals.tsx
+++ b/web/app/components/datasets/list/dataset-card/components/dataset-card-modals.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import * as React from 'react'
@@ -54,14 +55,12 @@ const DatasetCardModals = ({
onOpenChange={(open) => !open && onCloseConfirm()}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $.deleteDatasetConfirmTitle, { ns: 'dataset' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {modalState.confirmMessage}
- </AlertDialogDescription>
- </div>
+ <AlertDialogDescription>{modalState.confirmMessage}</AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx b/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx
index acba8683bc0..8c4492394d8 100644
--- a/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx
+++ b/web/app/components/datasets/metadata/metadata-dataset/dataset-metadata-drawer.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -126,17 +127,17 @@ const Item: FC<ItemProps> = ({ readonly, disabled, payload, onRename, onDelete }
}
/>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['metadata.datasetMetadata.deleteTitle'], { ns: 'dataset' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['metadata.datasetMetadata.deleteContent'], {
ns: 'dataset',
name: payload.name,
})}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/access-rules-page/access-rule-row-menu.tsx b/web/app/components/header/account-setting/access-rules-page/access-rule-row-menu.tsx
index 8127fa9067f..49b619b3c3d 100644
--- a/web/app/components/header/account-setting/access-rules-page/access-rule-row-menu.tsx
+++ b/web/app/components/header/account-setting/access-rules-page/access-rule-row-menu.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import {
@@ -125,14 +126,14 @@ const AccessRuleRowMenu = ({ rule, onView, onEdit }: AccessRuleRowMenuProps) =>
onOpenChange={(open) => !open && setShowDeleteConfirm(false)}
>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['accessRule.deleteTitle'], { ns: 'permission', name: rule.name })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['accessRule.deleteDescription'], { ns: 'permission' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/api-based-extension-page/item.tsx b/web/app/components/header/account-setting/api-based-extension-page/item.tsx
index 1cc43e15e0d..3edabd052ec 100644
--- a/web/app/components/header/account-setting/api-based-extension-page/item.tsx
+++ b/web/app/components/header/account-setting/api-based-extension-page/item.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -77,11 +78,11 @@ export function Item({ apiBasedExtension, onEdit, canManage = true }: ItemProps)
<span id={deleteLabelId}>{t(($) => $['operation.delete'], { ns: 'common' })}</span>
</AlertDialogTrigger>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{`${t(($) => $['operation.delete'], { ns: 'common' })} \u201C${apiBasedExtension.name}\u201D?`}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/data-source-page-new/card.tsx b/web/app/components/header/account-setting/data-source-page-new/card.tsx
index 9d68d4fcb78..4e89ce2a0d9 100644
--- a/web/app/components/header/account-setting/data-source-page-new/card.tsx
+++ b/web/app/components/header/account-setting/data-source-page-new/card.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useMutation } from '@tanstack/react-query'
@@ -186,11 +187,11 @@ const Card = ({ item, disabled, pluginDetail, onPluginUpdate }: CardProps) => {
)}
<AlertDialog open={!!deleteCredentialId} onOpenChange={(open) => !open && closeConfirm()}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['list.delete.title'], { ns: 'datasetDocuments' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/members-page/member-menu.tsx b/web/app/components/header/account-setting/members-page/member-menu.tsx
index 8ac71f11927..f6b367965c4 100644
--- a/web/app/components/header/account-setting/members-page/member-menu.tsx
+++ b/web/app/components/header/account-setting/members-page/member-menu.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import {
@@ -164,17 +165,17 @@ const MemberMenu = ({
onOpenChange={(open) => !open && setRemoveConfirmOpen(false)}
>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['members.removeFromTeamConfirmTitle'], {
ns: 'workspaceMembers',
memberName,
})}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['members.removeFromTeamConfirmDescription'], { ns: 'workspaceMembers' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/index.tsx
index e5285511370..790c5589859 100644
--- a/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/index.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/model-auth/authorized/index.tsx
@@ -14,6 +14,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -268,11 +269,11 @@ const Authorized = ({
onOpenChange={(open) => !open && closeConfirmDelete()}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['modelProvider.confirmDelete'], { ns: 'modelProvider' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx
index d997c8d3a84..9a187b4a0f8 100644
--- a/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/model-modal/index.tsx
@@ -12,6 +12,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -456,11 +457,11 @@ const ModelModal: FC<ModelModalProps> = ({
</DialogContent>
<AlertDialog open={!!deleteCredentialId} onOpenChange={handleConfirmOpenChange}>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 p-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['modelProvider.confirmDelete'], { ns: 'modelProvider' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/dropdown-content.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/dropdown-content.tsx
index b6aa314d1f8..ac1d3ee8b84 100644
--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/dropdown-content.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-auth-dropdown/dropdown-content.tsx
@@ -5,8 +5,8 @@ import {
AlertDialogCancelButton,
AlertDialogConfirmButton,
AlertDialogContent,
- AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { memo, useCallback } from 'react'
@@ -120,12 +120,11 @@ function DropdownContent({
}}
>
<AlertDialogContent>
- <div className="p-6 pb-0">
- <AlertDialogTitle className="system-xl-semibold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['modelProvider.confirmDelete'], { ns: 'modelProvider' })}
</AlertDialogTitle>
- <AlertDialogDescription className="mt-1 system-sm-regular text-text-secondary" />
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={doingAction}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx
index 71e51612b26..878dfb2112d 100644
--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx
@@ -13,6 +13,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -439,11 +440,11 @@ const ModelLoadBalancingModal = ({
)}
<AlertDialog open={!!deleteModel} onOpenChange={(open) => !open && closeConfirmDelete()}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['modelProvider.confirmDelete'], { ns: 'modelProvider' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/model-provider-page/provider-added-card/provider-card-actions.tsx b/web/app/components/header/account-setting/model-provider-page/provider-added-card/provider-card-actions.tsx
index 3f4a224c770..aff4589d8f5 100644
--- a/web/app/components/header/account-setting/model-provider-page/provider-added-card/provider-card-actions.tsx
+++ b/web/app/components/header/account-setting/model-provider-page/provider-added-card/provider-card-actions.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -256,16 +257,14 @@ function SummaryProviderCardActions({ summary, providerLabel, onUpdate }: Summar
}}
>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
- {t(($) => $['action.delete'], { ns: 'plugin' })}
- </AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>{t(($) => $['action.delete'], { ns: 'plugin' })}</AlertDialogTitle>
+ <AlertDialogDescription>
{t(($) => $['action.deleteContentLeft'], { ns: 'plugin' })}
<span className="system-md-semibold text-text-secondary">{providerLabel}</span>
{t(($) => $['action.deleteContentRight'], { ns: 'plugin' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={deleting}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/permissions-page/role-list/copy-members-confirm-dialog.tsx b/web/app/components/header/account-setting/permissions-page/role-list/copy-members-confirm-dialog.tsx
index 6f597cb3d44..979bf3519a3 100644
--- a/web/app/components/header/account-setting/permissions-page/role-list/copy-members-confirm-dialog.tsx
+++ b/web/app/components/header/account-setting/permissions-page/role-list/copy-members-confirm-dialog.tsx
@@ -3,12 +3,13 @@
import type { Role } from '@/models/access-control'
import {
AlertDialog,
+ AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
-import { Button } from '@langgenius/dify-ui/button'
import { useQuery } from '@tanstack/react-query'
import { useTranslation } from 'react-i18next'
import { consoleQuery } from '@/service/console'
@@ -39,11 +40,11 @@ export function CopyMembersConfirmDialog({
return (
<AlertDialog open onOpenChange={onOpenChange}>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['role.copyMembersTitle'], { ns: 'permission' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-secondary">
+ <AlertDialogDescription>
{isLoadingMemberCount
? t(($) => $['role.copyMembersLoading'], { ns: 'permission' })
: t(($) => $['role.copyMembersDescription'], {
@@ -52,23 +53,24 @@ export function CopyMembersConfirmDialog({
count: memberCount,
})}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <Button
+ <AlertDialogConfirmButton
variant="secondary"
+ tone="default"
disabled={isActionDisabled}
onClick={() => onDuplicate(false)}
>
{t(($) => $['operation.skip'], { ns: 'common' })}
- </Button>
- <Button
- variant="primary"
+ </AlertDialogConfirmButton>
+ <AlertDialogConfirmButton
+ tone="default"
disabled={isLoadingMemberCount}
loading={isCopyingRole}
onClick={() => onDuplicate(true)}
>
{t(($) => $['operation.copy'], { ns: 'common' })}
- </Button>
+ </AlertDialogConfirmButton>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
diff --git a/web/app/components/header/account-setting/permissions-page/role-list/row-menu.tsx b/web/app/components/header/account-setting/permissions-page/role-list/row-menu.tsx
index 855c0d187da..56b8a34e70b 100644
--- a/web/app/components/header/account-setting/permissions-page/role-list/row-menu.tsx
+++ b/web/app/components/header/account-setting/permissions-page/role-list/row-menu.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import {
@@ -161,14 +162,14 @@ const RowMenu = ({ roleCategory, role, onView, onEdit }: RowMenuProps) => {
onOpenChange={(open) => !open && setShowDeleteConfirm(false)}
>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['role.deleteTitle'], { ns: 'permission', name: role.name })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['role.deleteDescription'], { ns: 'permission' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/header/account-setting/resource-access-token-page/delete-token-dialog.tsx b/web/app/components/header/account-setting/resource-access-token-page/delete-token-dialog.tsx
index 437848b3df6..1d4713b62c4 100644
--- a/web/app/components/header/account-setting/resource-access-token-page/delete-token-dialog.tsx
+++ b/web/app/components/header/account-setting/resource-access-token-page/delete-token-dialog.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -20,14 +21,16 @@ export function DeleteTokenDialogContent({
const { t } = useTranslation(['common', 'accountSettings'])
return (
- <AlertDialogContent className="w-120 p-6 text-left" backdropProps={{ forceRender: true }}>
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
- {t(($) => $['resourceAccessToken.deleteTitle'], { ns: 'accountSettings' })}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 system-sm-regular text-text-tertiary">
- {t(($) => $['resourceAccessToken.deleteDescription'], { ns: 'accountSettings' })}
- </AlertDialogDescription>
- <AlertDialogFooter className="mt-6 p-0">
+ <AlertDialogContent backdropProps={{ forceRender: true }}>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t(($) => $['resourceAccessToken.deleteTitle'], { ns: 'accountSettings' })}
+ </AlertDialogTitle>
+ <AlertDialogDescription>
+ {t(($) => $['resourceAccessToken.deleteDescription'], { ns: 'accountSettings' })}
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogCancelButton disabled={isPending}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
diff --git a/web/app/components/header/account-setting/workflow-log-archives-page/index.tsx b/web/app/components/header/account-setting/workflow-log-archives-page/index.tsx
index af80479c5da..e7538a5e298 100644
--- a/web/app/components/header/account-setting/workflow-log-archives-page/index.tsx
+++ b/web/app/components/header/account-setting/workflow-log-archives-page/index.tsx
@@ -12,6 +12,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -523,11 +524,11 @@ function WorkflowArchiveMonthRow({ archive }: { archive: WorkflowRunArchiveMonth
</span>
</AlertDialogTrigger>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['archives.delete.title'], { ns: 'appLog', month: archiveMonth })}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular wrap-break-word text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['archives.delete.description'], { ns: 'appLog' })}
</AlertDialogDescription>
{deleteArchiveMutation.isError && (
@@ -535,12 +536,9 @@ function WorkflowArchiveMonthRow({ archive }: { archive: WorkflowRunArchiveMonth
{t(($) => $['archives.delete.requestFailed'], { ns: 'appLog' })}
</div>
)}
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton
- variant="secondary"
- disabled={deleteArchiveMutation.isPending}
- >
+ <AlertDialogCancelButton disabled={deleteArchiveMutation.isPending}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton
diff --git a/web/app/components/plugins/plugin-auth/authorized/index.tsx b/web/app/components/plugins/plugin-auth/authorized/index.tsx
index ed6e5fde821..52a751655cb 100644
--- a/web/app/components/plugins/plugin-auth/authorized/index.tsx
+++ b/web/app/components/plugins/plugin-auth/authorized/index.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -326,11 +327,11 @@ const Authorized = ({
</Popover>
<AlertDialog open={!!deleteCredentialId} onOpenChange={(open) => !open && closeConfirm()}>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['list.delete.title'], { ns: 'datasetDocuments' })}
</AlertDialogTitle>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/plugins/plugin-detail-panel/detail-header/components/header-modals.tsx b/web/app/components/plugins/plugin-detail-panel/detail-header/components/header-modals.tsx
index 0a7a2041364..bc2541b10d7 100644
--- a/web/app/components/plugins/plugin-detail-panel/detail-header/components/header-modals.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/detail-header/components/header-modals.tsx
@@ -10,6 +10,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -74,16 +75,16 @@ const HeaderModals: FC<HeaderModalsProps> = ({
}}
>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $[`${i18nPrefix}.delete`], { ns: 'plugin' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $[`${i18nPrefix}.deleteContentLeft`], { ns: 'plugin' })}
<span className="system-md-semibold text-text-secondary">{label[locale]}</span>
{t(($) => $[`${i18nPrefix}.deleteContentRight`], { ns: 'plugin' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={deleting}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
index 9e63d9cb6a3..14edd80270c 100644
--- a/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/endpoint-card.tsx
@@ -6,7 +6,9 @@ import {
AlertDialogCancelButton,
AlertDialogConfirmButton,
AlertDialogContent,
+ AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -117,17 +119,17 @@ const EndpointCard = ({ pluginDetail, data }: Props) => {
}
/>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['detailPanel.endpointDeleteTip'], { ns: 'plugin' })}
</AlertDialogTitle>
- <div className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['detailPanel.endpointDeleteContent'], {
ns: 'plugin',
name: data.name,
})}
- </div>
- </div>
+ </AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
@@ -207,14 +209,14 @@ const EndpointCard = ({ pluginDetail, data }: Props) => {
onOpenChange={(open) => !open && hideDisableConfirm()}
>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['detailPanel.endpointDisableTip'], { ns: 'plugin' })}
</AlertDialogTitle>
- <div className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['detailPanel.endpointDisableContent'], { ns: 'plugin', name: data.name })}
- </div>
- </div>
+ </AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/delete-confirm.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/delete-confirm.tsx
index a3bb6c7596e..66dd6b0a277 100644
--- a/web/app/components/plugins/plugin-detail-panel/subscription-list/delete-confirm.tsx
+++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/delete-confirm.tsx
@@ -5,6 +5,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Field, FieldLabel } from '@langgenius/dify-ui/field'
@@ -69,11 +70,11 @@ export const DeleteConfirm = (props: Props) => {
onConfirm()
}}
>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $[`${tPrefix}.title`], { ns: 'pluginTrigger', name: currentName })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{workflowsInUse > 0
? t(($) => $[`${tPrefix}.contentWithApps`], {
ns: 'pluginTrigger',
@@ -82,7 +83,7 @@ export const DeleteConfirm = (props: Props) => {
: t(($) => $[`${tPrefix}.content`], { ns: 'pluginTrigger' })}
</AlertDialogDescription>
{workflowsInUse > 0 && (
- <Field className="mt-6" name="confirmation">
+ <Field name="confirmation">
<FieldLabel>
{t(($) => $[`${tPrefix}.confirmInputTip`], {
ns: 'pluginTrigger',
@@ -99,7 +100,7 @@ export const DeleteConfirm = (props: Props) => {
/>
</Field>
)}
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={isDeleting}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/plugins/plugin-item/action.tsx b/web/app/components/plugins/plugin-item/action.tsx
index fbfaf24cae5..06f56805466 100644
--- a/web/app/components/plugins/plugin-item/action.tsx
+++ b/web/app/components/plugins/plugin-item/action.tsx
@@ -7,7 +7,9 @@ import {
AlertDialogCancelButton,
AlertDialogConfirmButton,
AlertDialogContent,
+ AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { IconButton } from '@langgenius/dify-ui/icon-button'
@@ -177,17 +179,16 @@ const Action: FC<Props> = ({
)}
<AlertDialog open={isShowDeleteConfirm} onOpenChange={(open) => !open && hideDeleteConfirm()}>
<AlertDialogContent backdropProps={{ forceRender: true }}>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $[`${i18nPrefix}.delete`], { ns: 'plugin' })}
</AlertDialogTitle>
- <div className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $[`${i18nPrefix}.deleteContentLeft`], { ns: 'plugin' })}
<span className="system-md-semibold">{pluginName}</span>
{t(($) => $[`${i18nPrefix}.deleteContentRight`], { ns: 'plugin' })}
- <br />
- </div>
- </div>
+ </AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/rag-pipeline/components/conversion.tsx b/web/app/components/rag-pipeline/components/conversion.tsx
index 51a6ec5fdfa..dfc8f8213d3 100644
--- a/web/app/components/rag-pipeline/components/conversion.tsx
+++ b/web/app/components/rag-pipeline/components/conversion.tsx
@@ -5,6 +5,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -128,17 +129,10 @@ const Conversion = () => {
onOpenChange={(open) => !open && handleCancelConversion()}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- title={confirmTitle}
- >
- {confirmTitle}
- </AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {confirmContent}
- </AlertDialogDescription>
- </div>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{confirmTitle}</AlertDialogTitle>
+ <AlertDialogDescription>{confirmContent}</AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/rag-pipeline/components/export-confirm-modal.tsx b/web/app/components/rag-pipeline/components/export-confirm-modal.tsx
index 0fe8081e15d..8dc33f2cfaa 100644
--- a/web/app/components/rag-pipeline/components/export-confirm-modal.tsx
+++ b/web/app/components/rag-pipeline/components/export-confirm-modal.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogConfirmButton,
AlertDialogContent,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Checkbox } from '@langgenius/dify-ui/checkbox'
@@ -39,11 +40,11 @@ const PipelineExportConfirmContent = ({
}, [exportSecrets, isExporting, onClose, onConfirm])
return (
- <AlertDialogContent className="w-120 max-w-120">
- <div className="px-6 pt-6">
- <AlertDialogTitle className="pb-6 title-2xl-semi-bold text-text-primary">
- {t(($) => $['env.export.title'], { ns: 'workflow' })}
- </AlertDialogTitle>
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{t(($) => $['env.export.title'], { ns: 'workflow' })}</AlertDialogTitle>
+ </AlertDialogHeader>
+ <div className="px-6">
<div className="relative">
<table className="w-full border-separate border-spacing-0 rounded-lg border border-divider-regular shadow-xs">
<thead className="system-xs-medium-uppercase text-text-tertiary">
diff --git a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx
index c9ce1409aff..b5eef9b07ff 100644
--- a/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx
+++ b/web/app/components/rag-pipeline/components/rag-pipeline-header/publisher/popup.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button, buttonVariants } from '@langgenius/dify-ui/button'
@@ -360,17 +361,14 @@ export function Popup({
</div>
<AlertDialog open={confirmVisible} onOpenChange={(open) => !open && handleHideConfirm()}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- title={t(($) => $['common.confirmPublish'], { ns: 'pipeline' })}
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- >
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['common.confirmPublish'], { ns: 'pipeline' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['common.confirmPublishContent'], { ns: 'pipeline' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/rag-pipeline/components/version-mismatch-modal.tsx b/web/app/components/rag-pipeline/components/version-mismatch-modal.tsx
index d9bfa6a014b..09a5924f310 100644
--- a/web/app/components/rag-pipeline/components/version-mismatch-modal.tsx
+++ b/web/app/components/rag-pipeline/components/version-mismatch-modal.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -35,15 +36,12 @@ const VersionMismatchModal = ({
if (!open) onClose()
}}
>
- <AlertDialogContent className="w-120 max-w-none! overflow-hidden! border-none p-6 text-left align-middle shadow-xl">
- <div className="flex flex-col items-start gap-2 self-stretch pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['newApp.appCreateDSLErrorTitle'], { ns: 'app' })}
</AlertDialogTitle>
- <AlertDialogDescription
- render={<div />}
- className="flex grow flex-col system-md-regular text-text-secondary"
- >
+ <AlertDialogDescription render={<div />}>
<div>{t(($) => $['newApp.appCreateDSLErrorPart1'], { ns: 'app' })}</div>
<div>{t(($) => $['newApp.appCreateDSLErrorPart2'], { ns: 'app' })}</div>
<br />
@@ -56,9 +54,9 @@ const VersionMismatchModal = ({
<span className="system-md-medium">{versions?.systemVersion}</span>
</div>
</AlertDialogDescription>
- </div>
- <AlertDialogFooter className="items-start p-0 pt-6">
- <AlertDialogCancelButton variant="secondary">
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancelButton>
{t(($) => $['newApp.Cancel'], { ns: 'app' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton onClick={onConfirm}>
diff --git a/web/app/components/snippet-list/components/snippet-card.tsx b/web/app/components/snippet-list/components/snippet-card.tsx
index 34c044356ea..b7df42b039e 100644
--- a/web/app/components/snippet-list/components/snippet-card.tsx
+++ b/web/app/components/snippet-list/components/snippet-card.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import {
@@ -249,16 +250,12 @@ const SnippetCard = ({
/>
)}
<AlertDialog open={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen}>
- <AlertDialogContent className="w-100">
- <div className="space-y-2 p-6">
- <AlertDialogTitle className="title-md-semi-bold text-text-primary">
- {t(($) => $.deleteConfirmTitle)}
- </AlertDialogTitle>
- <AlertDialogDescription className="system-sm-regular text-text-tertiary">
- {t(($) => $.deleteConfirmContent)}
- </AlertDialogDescription>
- </div>
- <AlertDialogFooter className="pt-0">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{t(($) => $.deleteConfirmTitle)}</AlertDialogTitle>
+ <AlertDialogDescription>{t(($) => $.deleteConfirmContent)}</AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogCancelButton disabled={deleteSnippetMutation.isPending}>
{tCommon(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
diff --git a/web/app/components/snippets/import-snippet-dsl-dialog.tsx b/web/app/components/snippets/import-snippet-dsl-dialog.tsx
index 6c2a72fa750..c8cd1f99cbd 100644
--- a/web/app/components/snippets/import-snippet-dsl-dialog.tsx
+++ b/web/app/components/snippets/import-snippet-dsl-dialog.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -71,15 +72,12 @@ function SnippetDSLConfirmDialog({
if (!open) onCancel()
}}
>
- <AlertDialogContent className="w-120 overflow-hidden! border-none text-left align-middle shadow-xl">
- <div className="flex flex-col items-start gap-2 self-stretch p-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $.dslVersionMismatchTitle, { ns: 'snippet' })}
</AlertDialogTitle>
- <AlertDialogDescription
- render={<div />}
- className="flex grow flex-col system-md-regular text-text-secondary"
- >
+ <AlertDialogDescription render={<div />}>
<div>{t(($) => $.dslVersionMismatchDescription, { ns: 'snippet' })}</div>
<div>{t(($) => $.dslVersionMismatchQuestion, { ns: 'snippet' })}</div>
<br />
@@ -92,9 +90,9 @@ function SnippetDSLConfirmDialog({
<span className="system-md-medium">{versions.systemVersion}</span>
</div>
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton variant="secondary">
+ <AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton onClick={onConfirm} disabled={confirmDisabled}>
diff --git a/web/app/components/tools/mcp/detail/content.tsx b/web/app/components/tools/mcp/detail/content.tsx
index e1ad0265c32..edddd682384 100644
--- a/web/app/components/tools/mcp/detail/content.tsx
+++ b/web/app/components/tools/mcp/detail/content.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -304,14 +305,14 @@ const MCPDetailContent: FC<Props> = ({
onOpenChange={(open) => !open && hideUpdateConfirm()}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['mcp.toolUpdateConfirmTitle'], { ns: 'tools' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['mcp.toolUpdateConfirmContent'], { ns: 'tools' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/tools/mcp/index.tsx b/web/app/components/tools/mcp/index.tsx
index f55292fabec..f2abf80c03a 100644
--- a/web/app/components/tools/mcp/index.tsx
+++ b/web/app/components/tools/mcp/index.tsx
@@ -10,6 +10,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -215,14 +216,12 @@ const MCPList = ({
{deletingProvider && (
<AlertDialog open onOpenChange={(open) => !open && setDeletingProviderID(undefined)}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
- {t(($) => $['mcp.delete'], { ns: 'tools' })}
- </AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>{t(($) => $['mcp.delete'], { ns: 'tools' })}</AlertDialogTitle>
+ <AlertDialogDescription>
{t(($) => $['mcp.deleteConfirmTitle'], { ns: 'tools', mcp: deletingProvider.name })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/tools/provider/detail.tsx b/web/app/components/tools/provider/detail.tsx
index c64bea58416..f1c6a24c436 100644
--- a/web/app/components/tools/provider/detail.tsx
+++ b/web/app/components/tools/provider/detail.tsx
@@ -15,6 +15,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button, buttonVariants } from '@langgenius/dify-ui/button'
@@ -539,14 +540,14 @@ const ProviderDetail = ({ collection, onHide, onRefreshData }: Props) => {
onOpenChange={(open) => !open && setShowConfirmDelete(false)}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['createTool.deleteToolConfirmTitle'], { ns: 'tools' })}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['createTool.deleteToolConfirmContent'], { ns: 'tools' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/workflow/comment/thread.tsx b/web/app/components/workflow/comment/thread.tsx
index f280ab30a34..b987a462162 100644
--- a/web/app/components/workflow/comment/thread.tsx
+++ b/web/app/components/workflow/comment/thread.tsx
@@ -12,6 +12,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Avatar, AvatarFallback, AvatarImage } from '@langgenius/dify-ui/avatar'
@@ -818,14 +819,14 @@ function CommentThreadComponent({
: (replyInputRef.current ?? true)
}
>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{t(($) => $['comments.actions.deleteReply'], { ns: 'workflowComments' })}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['operation.confirmAction'], { ns: 'common' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton disabled={loading}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/workflow/index.tsx b/web/app/components/workflow/index.tsx
index 3bdc50dd758..7ea9a0aedec 100644
--- a/web/app/components/workflow/index.tsx
+++ b/web/app/components/workflow/index.tsx
@@ -16,6 +16,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -664,16 +665,12 @@ export const Workflow: FC<WorkflowProps> = memo(
}}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
- {showConfirm?.title}
- </AlertDialogTitle>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{showConfirm?.title}</AlertDialogTitle>
{showConfirm?.desc && (
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {showConfirm.desc}
- </AlertDialogDescription>
+ <AlertDialogDescription>{showConfirm.desc}</AlertDialogDescription>
)}
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/workflow/nodes/_base/components/remove-effect-var-confirm.tsx b/web/app/components/workflow/nodes/_base/components/remove-effect-var-confirm.tsx
index a03383854c2..fc701ae40c8 100644
--- a/web/app/components/workflow/nodes/_base/components/remove-effect-var-confirm.tsx
+++ b/web/app/components/workflow/nodes/_base/components/remove-effect-var-confirm.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import * as React from 'react'
@@ -27,17 +28,10 @@ const RemoveVarConfirm: FC<Props> = ({ isShow, onConfirm, onCancel }) => {
return (
<AlertDialog open={isShow} onOpenChange={(open) => !open && onCancel()}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- title={title}
- >
- {title}
- </AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {content}
- </AlertDialogDescription>
- </div>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{title}</AlertDialogTitle>
+ <AlertDialogDescription>{content}</AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/app/components/workflow/panel/version-history-panel/delete-confirm-modal.tsx b/web/app/components/workflow/panel/version-history-panel/delete-confirm-modal.tsx
index 46dc9250a95..7f2c092f389 100644
--- a/web/app/components/workflow/panel/version-history-panel/delete-confirm-modal.tsx
+++ b/web/app/components/workflow/panel/version-history-panel/delete-confirm-modal.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import * as React from 'react'
@@ -35,20 +36,20 @@ const DeleteConfirmModal: FC<DeleteConfirmModalProps> = ({
if (!open) onClose()
}}
>
- <AlertDialogContent className="overflow-hidden! border-none text-left align-middle shadow-xl">
- <div className="flex flex-col gap-y-2 p-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{`${t(($) => $['operation.delete'], { ns: 'common' })} ${getWorkflowVersionName(
versionInfo,
t(($) => $['versionHistory.defaultName'], { ns: 'workflowHistory' }),
)}`}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular text-text-secondary">
+ <AlertDialogDescription>
{t(($) => $['versionHistory.deletionTip'], { ns: 'workflowHistory' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton variant="secondary">
+ <AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton onClick={onDelete.bind(null, versionInfo.id)}>
diff --git a/web/app/components/workflow/panel/version-history-panel/restore-confirm-modal.tsx b/web/app/components/workflow/panel/version-history-panel/restore-confirm-modal.tsx
index 2c558a75333..e821cd3c66d 100644
--- a/web/app/components/workflow/panel/version-history-panel/restore-confirm-modal.tsx
+++ b/web/app/components/workflow/panel/version-history-panel/restore-confirm-modal.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import * as React from 'react'
@@ -35,20 +36,20 @@ const RestoreConfirmModal: FC<RestoreConfirmModalProps> = ({
if (!open) onClose()
}}
>
- <AlertDialogContent className="overflow-hidden! border-none text-left align-middle shadow-xl">
- <div className="flex flex-col gap-y-2 p-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{`${t(($) => $['common.restore'], { ns: 'workflow' })} ${getWorkflowVersionName(
versionInfo,
t(($) => $['versionHistory.defaultName'], { ns: 'workflowHistory' }),
)}`}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular text-text-secondary">
+ <AlertDialogDescription>
{t(($) => $['versionHistory.restorationTip'], { ns: 'workflowHistory' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton variant="secondary">
+ <AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton tone="default" onClick={onRestore.bind(null, versionInfo)}>
diff --git a/web/app/components/workflow/workflow-generator/index.tsx b/web/app/components/workflow/workflow-generator/index.tsx
index f87f43ef3f0..b755d9d529e 100644
--- a/web/app/components/workflow/workflow-generator/index.tsx
+++ b/web/app/components/workflow/workflow-generator/index.tsx
@@ -17,6 +17,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button, buttonVariants } from '@langgenius/dify-ui/button'
@@ -138,14 +139,10 @@ const RecoveryDialog = ({
}: RecoveryDialogProps) => (
<AlertDialog open={open} onOpenChange={(o) => !o && onOpenChange(false)}>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
- {title}
- </AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {description}
- </AlertDialogDescription>
- </div>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{title}</AlertDialogTitle>
+ <AlertDialogDescription>{description}</AlertDialogDescription>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>{cancelLabel}</AlertDialogCancelButton>
<AlertDialogConfirmButton onClick={onConfirm}>{confirmLabel}</AlertDialogConfirmButton>
diff --git a/web/features/agent-v2/agent-detail/configure/components/confirm-clear-session-dialog.tsx b/web/features/agent-v2/agent-detail/configure/components/confirm-clear-session-dialog.tsx
index 5606e51e5e4..2385f4583de 100644
--- a/web/features/agent-v2/agent-detail/configure/components/confirm-clear-session-dialog.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/confirm-clear-session-dialog.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from '@langgenius/dify-ui/alert-dialog'
@@ -57,16 +58,16 @@ export function AgentConfigureClearSessionConfirmDialog({
return (
<AlertDialog open={open} onOpenChange={handleOpenChange}>
{children && <AlertDialogTrigger render={children} />}
- <AlertDialogContent backdropProps={{ forceRender: true }} className="w-100">
- <div className="flex flex-col gap-1 p-6 pb-0">
- <AlertDialogTitle className="title-md-semi-bold text-text-primary">
+ <AlertDialogContent backdropProps={{ forceRender: true }}>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{title ?? t(($) => $['agentDetail.configure.clearSessionConfirm.title'])}
</AlertDialogTitle>
- <AlertDialogDescription className="system-sm-regular text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['agentDetail.configure.clearSessionConfirm.description'])}
</AlertDialogDescription>
- </div>
- <AlertDialogFooter className="pt-6">
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogCancelButton disabled={confirmDisabled || isConfirming}>
{tCommon(($) => $['operation.cancel'])}
</AlertDialogCancelButton>
diff --git a/web/features/agent-v2/agent-detail/configure/components/version-restore/index.tsx b/web/features/agent-v2/agent-detail/configure/components/version-restore/index.tsx
index 7bb9836d44b..c9736511b17 100644
--- a/web/features/agent-v2/agent-detail/configure/components/version-restore/index.tsx
+++ b/web/features/agent-v2/agent-detail/configure/components/version-restore/index.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
@@ -132,16 +133,16 @@ export function AgentVersionRestore({
}}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 p-6 pb-4">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{`${t(($) => $['agentDetail.versionHistory.restore'])} ${versionLabel}`}
</AlertDialogTitle>
- <AlertDialogDescription className="system-md-regular text-text-secondary">
+ <AlertDialogDescription>
{t(($) => $['versionHistory.restorationTip'], { ns: 'workflowHistory' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
- <AlertDialogCancelButton variant="secondary" disabled={mutation.isPending}>
+ <AlertDialogCancelButton disabled={mutation.isPending}>
{t(($) => $['operation.cancel'], { ns: 'common' })}
</AlertDialogCancelButton>
<AlertDialogConfirmButton
diff --git a/web/features/agent-v2/roster/components/delete-agent-dialog.tsx b/web/features/agent-v2/roster/components/delete-agent-dialog.tsx
index 7dad9157268..74405436a05 100644
--- a/web/features/agent-v2/roster/components/delete-agent-dialog.tsx
+++ b/web/features/agent-v2/roster/components/delete-agent-dialog.tsx
@@ -7,6 +7,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useMutation } from '@tanstack/react-query'
@@ -56,22 +57,20 @@ export function DeleteAgentDialog({
return (
<AlertDialog open={open} onOpenChange={onOpenChange}>
- <AlertDialogContent className="p-6">
- <AlertDialogTitle className="truncate title-2xl-semi-bold text-text-primary">
- {t(($) => $['roster.deleteDialog.title'], { ns: 'agentRoster', name: agentName })}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {t(($) => $['roster.deleteDialog.description'], { ns: 'agentRoster', name: agentName })}
- </AlertDialogDescription>
- <AlertDialogFooter className="p-0 pt-6">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t(($) => $['roster.deleteDialog.title'], { ns: 'agentRoster', name: agentName })}
+ </AlertDialogTitle>
+ <AlertDialogDescription>
+ {t(($) => $['roster.deleteDialog.description'], { ns: 'agentRoster', name: agentName })}
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogCancelButton disabled={deleteAgentMutation.isPending}>
{tCommon(($) => $['operation.cancel'])}
</AlertDialogCancelButton>
- <AlertDialogConfirmButton
- tone="destructive"
- loading={deleteAgentMutation.isPending}
- onClick={handleDelete}
- >
+ <AlertDialogConfirmButton loading={deleteAgentMutation.isPending} onClick={handleDelete}>
{tCommon(($) => $['operation.delete'])}
</AlertDialogConfirmButton>
</AlertDialogFooter>
diff --git a/web/features/skills/detail/file-tree.tsx b/web/features/skills/detail/file-tree.tsx
index abc393cb16e..5a618a23519 100644
--- a/web/features/skills/detail/file-tree.tsx
+++ b/web/features/skills/detail/file-tree.tsx
@@ -27,6 +27,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import {
@@ -1567,22 +1568,18 @@ export function FileTree({
open={!!deleteNode}
onOpenChange={(open) => !open && setDeleteNode(undefined)}
>
- <AlertDialogContent className="p-6">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
- {t(($) => $['skillManagement.detail.deleteFileConfirm'])}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 system-md-regular text-text-tertiary">
- {deleteNode?.path}
- </AlertDialogDescription>
- <AlertDialogFooter className="p-0 pt-6">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t(($) => $['skillManagement.detail.deleteFileConfirm'])}
+ </AlertDialogTitle>
+ <AlertDialogDescription>{deleteNode?.path}</AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogCancelButton disabled={fileMutation.isPending}>
{tCommon(($) => $['operation.cancel'])}
</AlertDialogCancelButton>
- <AlertDialogConfirmButton
- tone="destructive"
- loading={fileMutation.isPending}
- onClick={handleDelete}
- >
+ <AlertDialogConfirmButton loading={fileMutation.isPending} onClick={handleDelete}>
{tCommon(($) => $['operation.delete'])}
</AlertDialogConfirmButton>
</AlertDialogFooter>
diff --git a/web/features/skills/detail/page.tsx b/web/features/skills/detail/page.tsx
index 2128a6e9123..14d8c672438 100644
--- a/web/features/skills/detail/page.tsx
+++ b/web/features/skills/detail/page.tsx
@@ -8,6 +8,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
@@ -357,14 +358,16 @@ export function SkillDetailPage({ skillId }: { skillId: string }) {
skillId={skillId}
/>
<AlertDialog open={!!saveConflictConfirm}>
- <AlertDialogContent className="p-6">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
- {t(($) => $['skillManagement.detail.saveConflictConfirmTitle'])}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 system-md-regular text-text-tertiary">
- {t(($) => $['skillManagement.detail.saveConflictConfirmDescription'])}
- </AlertDialogDescription>
- <AlertDialogFooter className="p-0 pt-6">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t(($) => $['skillManagement.detail.saveConflictConfirmTitle'])}
+ </AlertDialogTitle>
+ <AlertDialogDescription>
+ {t(($) => $['skillManagement.detail.saveConflictConfirmDescription'])}
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogConfirmButton
loading={saveConflictReloading}
tone="default"
diff --git a/web/features/skills/detail/restore-version-dialog-content.tsx b/web/features/skills/detail/restore-version-dialog-content.tsx
index 0c4e2ecae0b..5d467aee406 100644
--- a/web/features/skills/detail/restore-version-dialog-content.tsx
+++ b/web/features/skills/detail/restore-version-dialog-content.tsx
@@ -4,6 +4,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { useTranslation } from 'react-i18next'
@@ -21,16 +22,18 @@ export function RestoreVersionDialogContent({
const { t: tCommon } = useTranslation(['common'])
return (
- <AlertDialogContent className="p-6">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
- {t(($) => $['skillManagement.detail.restoreVersionConfirmTitle'])}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 system-md-regular whitespace-pre-line text-text-tertiary">
- {t(($) => $['skillManagement.detail.restoreVersionConfirmDescription'], {
- version: versionTitle,
- })}
- </AlertDialogDescription>
- <AlertDialogFooter className="p-0 pt-6">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t(($) => $['skillManagement.detail.restoreVersionConfirmTitle'])}
+ </AlertDialogTitle>
+ <AlertDialogDescription>
+ {t(($) => $['skillManagement.detail.restoreVersionConfirmDescription'], {
+ version: versionTitle,
+ })}
+ </AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogCancelButton disabled={isPending}>
{tCommon(($) => $['operation.cancel'])}
</AlertDialogCancelButton>
diff --git a/web/features/skills/detail/sidebar-actions.tsx b/web/features/skills/detail/sidebar-actions.tsx
index 765607f1638..75ab3dedd00 100644
--- a/web/features/skills/detail/sidebar-actions.tsx
+++ b/web/features/skills/detail/sidebar-actions.tsx
@@ -8,8 +8,10 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
+import { Button } from '@langgenius/dify-ui/button'
import {
DropdownMenu,
DropdownMenuContent,
@@ -115,16 +117,19 @@ function SkillDetailDeleteDialog({
}}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="truncate title-2xl-semi-bold text-text-primary">
- {t(($) => $['skillManagement.deleteDialog.title'], { name: detail.display_name })}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {description}
- </AlertDialogDescription>
- {referenceCount > 0 && (
- <div className="mt-4">
- {referencesQuery.isPending ? (
+ <form
+ onSubmit={(event) => {
+ event.preventDefault()
+ handleDelete()
+ }}
+ >
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t(($) => $['skillManagement.deleteDialog.title'], { name: detail.display_name })}
+ </AlertDialogTitle>
+ <AlertDialogDescription>{description}</AlertDialogDescription>
+ {referenceCount > 0 &&
+ (referencesQuery.isPending ? (
<SkillReferencesListSkeleton compact />
) : (
<SkillReferencesList
@@ -134,58 +139,60 @@ function SkillDetailDeleteDialog({
testId="skill-delete-reference-list"
visibleLimit={5}
/>
+ ))}
+ {referenceCount > 0 && (
+ <Field name="confirm-skill-name">
+ <FieldLabel>
+ <Trans
+ i18nKey={($) => $['skillManagement.deleteDialog.confirmInputLabel']}
+ ns="skill"
+ values={{ skillName: detail.display_name }}
+ components={{
+ skillName: (
+ <span className="system-sm-semibold text-text-primary" translate="no" />
+ ),
+ }}
+ />
+ </FieldLabel>
+ <InputGroup>
+ <InputGroupInput
+ type="text"
+ autoComplete="off"
+ spellCheck={false}
+ placeholder={t(
+ ($) => $['skillManagement.deleteDialog.confirmInputPlaceholder'],
+ )}
+ value={confirmDeleteInput}
+ onValueChange={setConfirmDeleteInput}
+ />
+ <InputGroupAddon align="inline-end">
+ <Button
+ variant="tertiary"
+ size="small"
+ onClick={() => setConfirmDeleteInput(detail.display_name)}
+ >
+ {tCommon(($) => $['operation.fill'])}
+ </Button>
+ </InputGroupAddon>
+ </InputGroup>
+ </Field>
+ )}
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancelButton disabled={deleteMutation.isPending}>
+ {tCommon(($) => $['operation.cancel'])}
+ </AlertDialogCancelButton>
+ <AlertDialogConfirmButton
+ loading={deleteMutation.isPending}
+ disabled={isDeleteUnavailable}
+ type="submit"
+ >
+ {tCommon(($) =>
+ referenceCount > 0 ? $['operation.confirm'] : $['operation.delete'],
)}
- </div>
- )}
- {referenceCount > 0 && (
- <Field name="confirm-skill-name" className="mt-2">
- <FieldLabel className="system-sm-regular">
- <Trans
- i18nKey={($) => $['skillManagement.deleteDialog.confirmInputLabel']}
- ns="skill"
- values={{ skillName: detail.display_name }}
- components={{
- skillName: (
- <span className="system-sm-semibold text-text-primary" translate="no" />
- ),
- }}
- />
- </FieldLabel>
- <InputGroup>
- <InputGroupInput
- type="text"
- autoComplete="off"
- spellCheck={false}
- placeholder={t(($) => $['skillManagement.deleteDialog.confirmInputPlaceholder'])}
- value={confirmDeleteInput}
- onValueChange={setConfirmDeleteInput}
- />
- <InputGroupAddon align="inline-end">
- <button
- type="button"
- onClick={() => setConfirmDeleteInput(detail.display_name)}
- className="rounded-full bg-black/6 px-2.5 py-1 system-xs-medium text-text-secondary hover:bg-black/10"
- >
- {tCommon(($) => $['operation.fill'])}
- </button>
- </InputGroupAddon>
- </InputGroup>
- </Field>
- )}
- </div>
- <AlertDialogFooter>
- <AlertDialogCancelButton disabled={deleteMutation.isPending}>
- {tCommon(($) => $['operation.cancel'])}
- </AlertDialogCancelButton>
- <AlertDialogConfirmButton
- tone="destructive"
- loading={deleteMutation.isPending}
- disabled={isDeleteUnavailable}
- onClick={handleDelete}
- >
- {tCommon(($) => (referenceCount > 0 ? $['operation.confirm'] : $['operation.delete']))}
- </AlertDialogConfirmButton>
- </AlertDialogFooter>
+ </AlertDialogConfirmButton>
+ </AlertDialogFooter>
+ </form>
</AlertDialogContent>
</AlertDialog>
)
diff --git a/web/features/skills/detail/version-panel.tsx b/web/features/skills/detail/version-panel.tsx
index faa375fd784..c6749ad8067 100644
--- a/web/features/skills/detail/version-panel.tsx
+++ b/web/features/skills/detail/version-panel.tsx
@@ -9,6 +9,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -426,22 +427,18 @@ function VersionRow({
setDeleteOpen(open)
}}
>
- <AlertDialogContent className="p-6">
- <AlertDialogTitle className="title-2xl-semi-bold text-text-primary">
- {t(($) => $['skillManagement.detail.deleteVersionConfirm'])}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 system-md-regular text-text-tertiary">
- {versionTitle}
- </AlertDialogDescription>
- <AlertDialogFooter className="p-0 pt-6">
+ <AlertDialogContent>
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t(($) => $['skillManagement.detail.deleteVersionConfirm'])}
+ </AlertDialogTitle>
+ <AlertDialogDescription>{versionTitle}</AlertDialogDescription>
+ </AlertDialogHeader>
+ <AlertDialogFooter>
<AlertDialogCancelButton disabled={deleteMutation.isPending}>
{tCommon(($) => $['operation.cancel'])}
</AlertDialogCancelButton>
- <AlertDialogConfirmButton
- tone="destructive"
- loading={deleteMutation.isPending}
- onClick={handleDelete}
- >
+ <AlertDialogConfirmButton loading={deleteMutation.isPending} onClick={handleDelete}>
{tCommon(($) => $['operation.delete'])}
</AlertDialogConfirmButton>
</AlertDialogFooter>
diff --git a/web/features/skills/page.tsx b/web/features/skills/page.tsx
index a9c167f2469..660ebccea2c 100644
--- a/web/features/skills/page.tsx
+++ b/web/features/skills/page.tsx
@@ -10,6 +10,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { Button } from '@langgenius/dify-ui/button'
@@ -323,16 +324,19 @@ function DeleteSkillDialog({
}}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="truncate title-2xl-semi-bold text-text-primary">
- {t(($) => $['skillManagement.deleteDialog.title'], { name: skill.display_name })}
- </AlertDialogTitle>
- <AlertDialogDescription className="mt-2 system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {description}
- </AlertDialogDescription>
- {referenceCount > 0 && (
- <div className="mt-4">
- {referencesQuery.isPending ? (
+ <form
+ onSubmit={(event) => {
+ event.preventDefault()
+ handleDelete()
+ }}
+ >
+ <AlertDialogHeader>
+ <AlertDialogTitle>
+ {t(($) => $['skillManagement.deleteDialog.title'], { name: skill.display_name })}
+ </AlertDialogTitle>
+ <AlertDialogDescription>{description}</AlertDialogDescription>
+ {referenceCount > 0 &&
+ (referencesQuery.isPending ? (
<SkillReferencesListSkeleton compact />
) : (
<SkillReferencesList
@@ -342,58 +346,58 @@ function DeleteSkillDialog({
testId="skill-delete-reference-list"
visibleLimit={5}
/>
- )}
- </div>
- )}
- {referenceCount > 0 && (
- <Field name="confirm-skill-name" className="mt-2">
- <FieldLabel className="system-sm-regular">
- <Trans
- i18nKey={($) => $['skillManagement.deleteDialog.confirmInputLabel']}
- ns="skill"
- values={{ skillName: skill.display_name }}
- components={{
- skillName: (
- <span className="system-sm-semibold text-text-primary" translate="no" />
- ),
- }}
- />
- </FieldLabel>
- <InputGroup>
- <InputGroupInput
- type="text"
- autoComplete="off"
- spellCheck={false}
- placeholder={t(($) => $['skillManagement.deleteDialog.confirmInputPlaceholder'])}
- value={confirmDeleteInput}
- onValueChange={setConfirmDeleteInput}
- />
- <InputGroupAddon align="inline-end">
- <button
- type="button"
- onClick={() => setConfirmDeleteInput(skill.display_name)}
- className="rounded-full bg-black/6 px-2.5 py-1 system-xs-medium text-text-secondary hover:bg-black/10"
- >
- {tCommon(($) => $['operation.fill'])}
- </button>
- </InputGroupAddon>
- </InputGroup>
- </Field>
- )}
- </div>
- <AlertDialogFooter>
- <AlertDialogCancelButton disabled={deleteMutation.isPending}>
- {tCommon(($) => $['operation.cancel'])}
- </AlertDialogCancelButton>
- <AlertDialogConfirmButton
- tone="destructive"
- loading={deleteMutation.isPending}
- disabled={isDeleteUnavailable}
- onClick={handleDelete}
- >
- {tCommon(($) => $['operation.delete'])}
- </AlertDialogConfirmButton>
- </AlertDialogFooter>
+ ))}
+ {referenceCount > 0 && (
+ <Field name="confirm-skill-name">
+ <FieldLabel>
+ <Trans
+ i18nKey={($) => $['skillManagement.deleteDialog.confirmInputLabel']}
+ ns="skill"
+ values={{ skillName: skill.display_name }}
+ components={{
+ skillName: (
+ <span className="system-sm-semibold text-text-primary" translate="no" />
+ ),
+ }}
+ />
+ </FieldLabel>
+ <InputGroup>
+ <InputGroupInput
+ type="text"
+ autoComplete="off"
+ spellCheck={false}
+ placeholder={t(
+ ($) => $['skillManagement.deleteDialog.confirmInputPlaceholder'],
+ )}
+ value={confirmDeleteInput}
+ onValueChange={setConfirmDeleteInput}
+ />
+ <InputGroupAddon align="inline-end">
+ <Button
+ variant="tertiary"
+ size="small"
+ onClick={() => setConfirmDeleteInput(skill.display_name)}
+ >
+ {tCommon(($) => $['operation.fill'])}
+ </Button>
+ </InputGroupAddon>
+ </InputGroup>
+ </Field>
+ )}
+ </AlertDialogHeader>
+ <AlertDialogFooter>
+ <AlertDialogCancelButton disabled={deleteMutation.isPending}>
+ {tCommon(($) => $['operation.cancel'])}
+ </AlertDialogCancelButton>
+ <AlertDialogConfirmButton
+ loading={deleteMutation.isPending}
+ disabled={isDeleteUnavailable}
+ type="submit"
+ >
+ {tCommon(($) => $['operation.delete'])}
+ </AlertDialogConfirmButton>
+ </AlertDialogFooter>
+ </form>
</AlertDialogContent>
</AlertDialog>
)
diff --git a/web/features/tag-management/components/tag-item-editor.tsx b/web/features/tag-management/components/tag-item-editor.tsx
index 46a4c6dde62..b3667f0b0f4 100644
--- a/web/features/tag-management/components/tag-item-editor.tsx
+++ b/web/features/tag-management/components/tag-item-editor.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { cn } from '@langgenius/dify-ui/cn'
@@ -151,17 +152,14 @@ export const TagItemEditor = ({ tag, onTagsChange }: TagItemEditorProps) => {
onOpenChange={(open) => !open && setShowRemoveModal(false)}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle
- title={`${t(($) => $['tag.delete'], { ns: 'common' })} "${tag.name}"`}
- className="w-full truncate title-2xl-semi-bold text-text-primary"
- >
+ <AlertDialogHeader>
+ <AlertDialogTitle>
{`${t(($) => $['tag.delete'], { ns: 'common' })} "${tag.name}"`}
</AlertDialogTitle>
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
+ <AlertDialogDescription>
{t(($) => $['tag.deleteTip'], { ns: 'common' })}
</AlertDialogDescription>
- </div>
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancelButton>
{t(($) => $['operation.cancel'], { ns: 'common' })}
diff --git a/web/hooks/use-pay.tsx b/web/hooks/use-pay.tsx
index e254f60c71b..91351e7c9cb 100644
--- a/web/hooks/use-pay.tsx
+++ b/web/hooks/use-pay.tsx
@@ -6,6 +6,7 @@ import {
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
+ AlertDialogHeader,
AlertDialogTitle,
} from '@langgenius/dify-ui/alert-dialog'
import { skipToken, useQuery } from '@tanstack/react-query'
@@ -130,16 +131,10 @@ export const CheckModal = () => {
onOpenChange={(open) => !open && handleCancelShowPayStatusModal()}
>
<AlertDialogContent>
- <div className="flex flex-col gap-2 px-6 pt-6 pb-4">
- <AlertDialogTitle className="w-full truncate title-2xl-semi-bold text-text-primary">
- {confirmInfo.title}
- </AlertDialogTitle>
- {description && (
- <AlertDialogDescription className="w-full system-md-regular wrap-break-word whitespace-pre-wrap text-text-tertiary">
- {description}
- </AlertDialogDescription>
- )}
- </div>
+ <AlertDialogHeader>
+ <AlertDialogTitle>{confirmInfo.title}</AlertDialogTitle>
+ {description && <AlertDialogDescription>{description}</AlertDialogDescription>}
+ </AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogConfirmButton
tone={confirmInfo.type !== 'info' ? 'destructive' : 'default'}