diff --git a/web/app/components/app-sidebar/snippet-info/dropdown.tsx b/web/app/components/app-sidebar/snippet-info/dropdown.tsx index 4022c6f3ec..1e1bddf615 100644 --- a/web/app/components/app-sidebar/snippet-info/dropdown.tsx +++ b/web/app/components/app-sidebar/snippet-info/dropdown.tsx @@ -2,6 +2,7 @@ import type { AppIconSelection } from '@/app/components/base/app-icon-picker' import type { SnippetDetail } from '@/models/snippet' +import { cn } from '@langgenius/dify-ui/cn' import * as React from 'react' import { useTranslation } from 'react-i18next' import { @@ -24,7 +25,7 @@ import { toast } from '@/app/components/base/ui/toast' import CreateSnippetDialog from '@/app/components/workflow/create-snippet-dialog' import { useRouter } from '@/next/navigation' import { useDeleteSnippetMutation, useExportSnippetMutation, useUpdateSnippetMutation } from '@/service/use-snippets' -import { cn } from '@/utils/classnames' + import { downloadBlob } from '@/utils/download' type SnippetInfoDropdownProps = { @@ -170,10 +171,10 @@ const SnippetInfoDropdown = ({ snippet }: SnippetInfoDropdownProps) => {
- + {t('deleteConfirmTitle')} - + {t('deleteConfirmContent')}
diff --git a/web/app/components/app-sidebar/snippet-info/index.tsx b/web/app/components/app-sidebar/snippet-info/index.tsx index e47f14fe9e..cc1f867026 100644 --- a/web/app/components/app-sidebar/snippet-info/index.tsx +++ b/web/app/components/app-sidebar/snippet-info/index.tsx @@ -1,10 +1,10 @@ 'use client' import type { SnippetDetail } from '@/models/snippet' +import { cn } from '@langgenius/dify-ui/cn' import * as React from 'react' import { useTranslation } from 'react-i18next' import AppIcon from '@/app/components/base/app-icon' -import { cn } from '@/utils/classnames' import SnippetInfoDropdown from './dropdown' type SnippetInfoProps = { @@ -19,7 +19,7 @@ const SnippetInfo = ({ const { t } = useTranslation('snippet') return ( -
+
@@ -34,16 +34,16 @@ const SnippetInfo = ({
{expand && (
-
+
{snippet.name}
-
+
{t('typeLabel')}
)} {expand && snippet.description && ( -

+

{snippet.description}

)} diff --git a/web/app/components/app/app-publisher/evaluation-workflow-switch-confirm-dialog.tsx b/web/app/components/app/app-publisher/evaluation-workflow-switch-confirm-dialog.tsx index 3e4a9cb5c7..39aad51ffd 100644 --- a/web/app/components/app/app-publisher/evaluation-workflow-switch-confirm-dialog.tsx +++ b/web/app/components/app/app-publisher/evaluation-workflow-switch-confirm-dialog.tsx @@ -2,6 +2,7 @@ import type { EvaluationWorkflowAssociatedTarget, EvaluationWorkflowAssociatedTargetType } from '@/types/evaluation' import type { I18nKeysWithPrefix } from '@/types/i18n' +import { cn } from '@langgenius/dify-ui/cn' import { useTranslation } from 'react-i18next' import { AlertDialog, @@ -13,7 +14,6 @@ import { AlertDialogTitle, } from '@/app/components/base/ui/alert-dialog' import Link from '@/next/link' -import { cn } from '@/utils/classnames' type EvaluationWorkflowSwitchConfirmDialogProps = { open: boolean @@ -80,7 +80,7 @@ const DependentTargetItem = ({ - + {targetName} @@ -108,10 +108,10 @@ const EvaluationWorkflowSwitchConfirmDialog = ({
- + {t('common.switchToStandardWorkflowConfirm.title', { ns: 'workflow' })} - + {t('common.switchToStandardWorkflowConfirm.activeIn', { ns: 'workflow', count: targets.length })} @@ -123,7 +123,7 @@ const EvaluationWorkflowSwitchConfirmDialog = ({
- + {t('common.switchToStandardWorkflowConfirm.dependentWorkflows', { ns: 'workflow' })} diff --git a/web/app/components/app/workflow-log/evaluation-cell.tsx b/web/app/components/app/workflow-log/evaluation-cell.tsx index 8cb3770681..3e49015454 100644 --- a/web/app/components/app/workflow-log/evaluation-cell.tsx +++ b/web/app/components/app/workflow-log/evaluation-cell.tsx @@ -1,6 +1,7 @@ 'use client' import type { EvaluationLogItem } from '@/models/log' +import { cn } from '@langgenius/dify-ui/cn' import { useState } from 'react' import { useTranslation } from 'react-i18next' import { @@ -9,7 +10,6 @@ import { PopoverTrigger, } from '@/app/components/base/ui/popover' import { getNodeVisual, getToneClasses } from '@/app/components/evaluation/components/metric-selector/utils' -import { cn } from '@/utils/classnames' type EvaluationCellProps = { evaluation: EvaluationLogItem[] @@ -30,7 +30,7 @@ const EvaluationCell = ({ if (!evaluation.length) { return ( -
+
-
) @@ -73,19 +73,19 @@ const EvaluationCell = ({ )} >
-
{item.name}
+
{item.name}
{item.nodeInfo && nodeVisual && nodeToneClasses && (
- + {item.nodeInfo.title}
)}
-
+
{formatEvaluationValue(item.value)}
diff --git a/web/app/components/apps/app-type-filter.tsx b/web/app/components/apps/app-type-filter.tsx index a7979daade..a1401100ae 100644 --- a/web/app/components/apps/app-type-filter.tsx +++ b/web/app/components/apps/app-type-filter.tsx @@ -1,6 +1,7 @@ 'use client' import type { AppListCategory } from './app-type-filter-shared' +import { cn } from '@langgenius/dify-ui/cn' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' import { @@ -12,7 +13,6 @@ import { DropdownMenuTrigger, } from '@/app/components/base/ui/dropdown-menu' import { AppModeEnum } from '@/types/app' -import { cn } from '@/utils/classnames' import { isAppListCategory } from './app-type-filter-shared' const chipClassName = 'flex h-8 items-center gap-1 rounded-lg border-[0.5px] border-transparent bg-components-input-bg-normal px-2 text-[13px] leading-[18px] text-text-secondary hover:bg-components-input-bg-hover' diff --git a/web/app/components/apps/creators-filter.tsx b/web/app/components/apps/creators-filter.tsx index 4bcff660e5..9a00ccab6f 100644 --- a/web/app/components/apps/creators-filter.tsx +++ b/web/app/components/apps/creators-filter.tsx @@ -1,5 +1,6 @@ 'use client' +import { cn } from '@langgenius/dify-ui/cn' import { useCallback, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import Checkbox from '@/app/components/base/checkbox' @@ -12,7 +13,6 @@ import { } from '@/app/components/base/ui/dropdown-menu' import { useAppContext } from '@/context/app-context' import { useMembers } from '@/service/use-common' -import { cn } from '@/utils/classnames' type CreatorsFilterProps = { value: string[] diff --git a/web/app/components/apps/studio-route-switch.tsx b/web/app/components/apps/studio-route-switch.tsx index 53f1337d06..18235f9b74 100644 --- a/web/app/components/apps/studio-route-switch.tsx +++ b/web/app/components/apps/studio-route-switch.tsx @@ -1,8 +1,8 @@ 'use client' import type { StudioPageType } from '.' +import { cn } from '@langgenius/dify-ui/cn' import Link from '@/next/link' -import { cn } from '@/utils/classnames' type Props = { pageType: StudioPageType @@ -18,7 +18,7 @@ const StudioRouteSwitch = ({ showSnippets = true, }: Props) => { return ( -
+
- + {t('history.columns.time')} - {t('history.columns.creator')} - {t('history.columns.version')} - {t('history.columns.status')} + {t('history.columns.creator')} + {t('history.columns.version')} + {t('history.columns.status')}