mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
[autofix.ci] apply automated fixes
This commit is contained in:
@ -3,10 +3,7 @@ import type {
|
||||
BlockEnum,
|
||||
CommonEdgeType,
|
||||
} from '../types'
|
||||
import {
|
||||
RiCloseLine,
|
||||
RiListCheck3,
|
||||
} from '@remixicon/react'
|
||||
|
||||
import {
|
||||
memo,
|
||||
useState,
|
||||
@ -81,9 +78,7 @@ const WorkflowChecklist = ({
|
||||
<div
|
||||
className={cn('group flex h-full w-full cursor-pointer items-center justify-center rounded-md hover:bg-state-accent-hover', open && 'bg-state-accent-hover')}
|
||||
>
|
||||
<RiListCheck3
|
||||
className={cn('h-4 w-4 group-hover:text-components-button-secondary-accent-text', open ? 'text-components-button-secondary-accent-text' : 'text-components-button-ghost-text')}
|
||||
/>
|
||||
<span className={`i-ri-list-check-3 ${cn('h-4 w-4 group-hover:text-components-button-secondary-accent-text', open ? 'text-components-button-secondary-accent-text' : 'text-components-button-ghost-text')}`} />
|
||||
</div>
|
||||
{
|
||||
!!needWarningNodes.length && (
|
||||
@ -110,7 +105,7 @@ const WorkflowChecklist = ({
|
||||
className="flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center"
|
||||
onClick={() => setOpen(false)}
|
||||
>
|
||||
<RiCloseLine className="h-4 w-4 text-text-tertiary" />
|
||||
<span className="i-ri-close-line h-4 w-4 text-text-tertiary" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="pb-2">
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { RiHistoryLine } from '@remixicon/react'
|
||||
import {
|
||||
useCallback,
|
||||
} from 'react'
|
||||
@ -100,7 +99,7 @@ const HeaderInRestoring = ({
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center gap-x-0.5">
|
||||
<RiHistoryLine className="h-4 w-4" />
|
||||
<span className="i-ri-history-line h-4 w-4" />
|
||||
<span className="px-0.5">{t('common.exitVersions', { ns: 'workflow' })}</span>
|
||||
</div>
|
||||
</Button>
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
import type { ViewHistoryProps } from './view-history'
|
||||
import {
|
||||
RiPlayLargeLine,
|
||||
} from '@remixicon/react'
|
||||
|
||||
import { memo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { cn } from '@/utils/classnames'
|
||||
@ -25,7 +23,7 @@ const PreviewMode = memo(() => {
|
||||
)}
|
||||
onClick={() => handleWorkflowStartRunInChatflow()}
|
||||
>
|
||||
<RiPlayLargeLine className="mr-1 h-4 w-4" />
|
||||
<span className="i-ri-play-large-line mr-1 h-4 w-4" />
|
||||
{t('common.debugAndPreview', { ns: 'workflow' })}
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import type { TestRunMenuRef, TriggerOption } from './test-run-menu'
|
||||
import { RiLoader2Line, RiPlayLargeLine } from '@remixicon/react'
|
||||
import * as React from 'react'
|
||||
import { useCallback, useEffect, useRef } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
@ -125,7 +124,7 @@ const RunMode = ({
|
||||
)}
|
||||
disabled={true}
|
||||
>
|
||||
<RiLoader2Line className="mr-1 size-4 animate-spin" />
|
||||
<span className="i-ri-loader-2-line mr-1 size-4 animate-spin" />
|
||||
{isListening ? t('common.listening', { ns: 'workflow' }) : t('common.running', { ns: 'workflow' })}
|
||||
</button>
|
||||
)
|
||||
@ -141,7 +140,7 @@ const RunMode = ({
|
||||
)}
|
||||
style={{ userSelect: 'none' }}
|
||||
>
|
||||
<RiPlayLargeLine className="mr-1 size-4" />
|
||||
<span className="i-ri-play-large-line mr-1 size-4" />
|
||||
{text ?? t('common.run', { ns: 'workflow' })}
|
||||
<div className="system-kbd flex items-center gap-x-0.5 text-text-tertiary">
|
||||
<div className="flex size-4 items-center justify-center rounded-[4px] bg-components-kbd-bg-gray">
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
import type { FC } from 'react'
|
||||
import {
|
||||
RiArrowGoBackLine,
|
||||
RiArrowGoForwardFill,
|
||||
} from '@remixicon/react'
|
||||
|
||||
import { memo, useEffect, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import ViewWorkflowHistory from '@/app/components/workflow/header/view-workflow-history'
|
||||
@ -41,7 +38,7 @@ const UndoRedo: FC<UndoRedoProps> = ({ handleUndo, handleRedo }) => {
|
||||
}
|
||||
onClick={() => !nodesReadOnly && !buttonsDisabled.undo && handleUndo()}
|
||||
>
|
||||
<RiArrowGoBackLine className="h-4 w-4" />
|
||||
<span className="i-ri-arrow-go-back-line h-4 w-4" />
|
||||
</div>
|
||||
</TipPopup>
|
||||
<TipPopup title={t('common.redo', { ns: 'workflow' })!} shortcuts={['ctrl', 'y']}>
|
||||
@ -53,7 +50,7 @@ const UndoRedo: FC<UndoRedoProps> = ({ handleUndo, handleRedo }) => {
|
||||
}
|
||||
onClick={() => !nodesReadOnly && !buttonsDisabled.redo && handleRedo()}
|
||||
>
|
||||
<RiArrowGoForwardFill className="h-4 w-4" />
|
||||
<span className="i-ri-arrow-go-forward-fill h-4 w-4" />
|
||||
</div>
|
||||
</TipPopup>
|
||||
<Divider type="vertical" className="mx-0.5 h-3.5" />
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import type { FC } from 'react'
|
||||
import { RiHistoryLine } from '@remixicon/react'
|
||||
import { useKeyPress } from 'ahooks'
|
||||
import * as React from 'react'
|
||||
import { useCallback } from 'react'
|
||||
@ -66,7 +65,7 @@ const VersionHistoryButton: FC<VersionHistoryButtonProps> = ({
|
||||
)}
|
||||
onClick={handleViewVersionHistory}
|
||||
>
|
||||
<RiHistoryLine className="h-4 w-4 text-components-button-secondary-text" />
|
||||
<span className="i-ri-history-line h-4 w-4 text-components-button-secondary-text" />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
)
|
||||
|
||||
@ -1,8 +1,3 @@
|
||||
import {
|
||||
RiCheckboxCircleLine,
|
||||
RiCloseLine,
|
||||
RiErrorWarningLine,
|
||||
} from '@remixicon/react'
|
||||
import {
|
||||
memo,
|
||||
useState,
|
||||
@ -129,7 +124,7 @@ const ViewHistory = ({
|
||||
setOpen(false)
|
||||
}}
|
||||
>
|
||||
<RiCloseLine className="h-4 w-4 text-text-tertiary" />
|
||||
<span className="i-ri-close-line h-4 w-4 text-text-tertiary" />
|
||||
</div>
|
||||
</div>
|
||||
{
|
||||
@ -181,12 +176,12 @@ const ViewHistory = ({
|
||||
}
|
||||
{
|
||||
!isChatMode && item.status === WorkflowRunningStatus.Failed && (
|
||||
<RiErrorWarningLine className="mr-1.5 mt-0.5 h-3.5 w-3.5 text-[#F04438]" />
|
||||
<span className="i-ri-error-warning-line mr-1.5 mt-0.5 h-3.5 w-3.5 text-[#F04438]" />
|
||||
)
|
||||
}
|
||||
{
|
||||
!isChatMode && item.status === WorkflowRunningStatus.Succeeded && (
|
||||
<RiCheckboxCircleLine className="mr-1.5 mt-0.5 h-3.5 w-3.5 text-[#12B76A]" />
|
||||
<span className="i-ri-checkbox-circle-line mr-1.5 mt-0.5 h-3.5 w-3.5 text-[#12B76A]" />
|
||||
)
|
||||
}
|
||||
<div>
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
import type { WorkflowHistoryState } from '../workflow-history-store'
|
||||
import {
|
||||
RiCloseLine,
|
||||
RiHistoryLine,
|
||||
} from '@remixicon/react'
|
||||
|
||||
import {
|
||||
memo,
|
||||
useCallback,
|
||||
@ -152,7 +149,7 @@ const ViewWorkflowHistory = () => {
|
||||
setShowMessageLogModal(false)
|
||||
}}
|
||||
>
|
||||
<RiHistoryLine className="h-4 w-4" />
|
||||
<span className="i-ri-history-line h-4 w-4" />
|
||||
</div>
|
||||
</TipPopup>
|
||||
</PortalToFollowElemTrigger>
|
||||
@ -170,7 +167,7 @@ const ViewWorkflowHistory = () => {
|
||||
setOpen(false)
|
||||
}}
|
||||
>
|
||||
<RiCloseLine className="h-4 w-4 text-text-secondary" />
|
||||
<span className="i-ri-close-line h-4 w-4 text-text-secondary" />
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -182,7 +179,7 @@ const ViewWorkflowHistory = () => {
|
||||
{
|
||||
!calculateChangeList.statesCount && (
|
||||
<div className="py-12">
|
||||
<RiHistoryLine className="mx-auto mb-2 h-8 w-8 text-text-tertiary" />
|
||||
<span className="i-ri-history-line mx-auto mb-2 h-8 w-8 text-text-tertiary" />
|
||||
<div className="text-center text-[13px] text-text-tertiary">
|
||||
{t('changeHistory.placeholder', { ns: 'workflow' })}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user