mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
feat(web): add FileDownload01 icon and use it in artifacts tab
Replace RiDownloadLine with a file-specific download icon for the artifacts file list and remove the unused copy-path button.
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
<svg width="12" height="14" viewBox="0 0 12 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.66667 6.66667H8.66667L6 9.33333L3.33333 6.66667H5.33333V4H6.66667V6.66667ZM8 1.33333H1.33333V12H10.6667V4H8V1.33333ZM0 0.6612C0 0.296033 0.298327 0 0.665667 0H8.66667L11.9998 3.33333L12 12.6617C12 13.0326 11.7034 13.3333 11.3377 13.3333H0.662267C0.296507 13.3333 0 13.0298 0 12.6721V0.6612Z" fill="#676F83"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 424 B |
@ -0,0 +1,26 @@
|
||||
{
|
||||
"icon": {
|
||||
"type": "element",
|
||||
"isRootNode": true,
|
||||
"name": "svg",
|
||||
"attributes": {
|
||||
"width": "12",
|
||||
"height": "14",
|
||||
"viewBox": "0 0 12 14",
|
||||
"fill": "none",
|
||||
"xmlns": "http://www.w3.org/2000/svg"
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"type": "element",
|
||||
"name": "path",
|
||||
"attributes": {
|
||||
"d": "M6.66667 6.66667H8.66667L6 9.33333L3.33333 6.66667H5.33333V4H6.66667V6.66667ZM8 1.33333H1.33333V12H10.6667V4H8V1.33333ZM0 0.6612C0 0.296033 0.298327 0 0.665667 0H8.66667L11.9998 3.33333L12 12.6617C12 13.0326 11.7034 13.3333 11.3377 13.3333H0.662267C0.296507 13.3333 0 13.0298 0 12.6721V0.6612Z",
|
||||
"fill": "currentColor"
|
||||
},
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "FileDownload01"
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
// GENERATE BY script
|
||||
// DON NOT EDIT IT MANUALLY
|
||||
|
||||
import type { IconData } from '@/app/components/base/icons/IconBase'
|
||||
import * as React from 'react'
|
||||
import IconBase from '@/app/components/base/icons/IconBase'
|
||||
import data from './FileDownload01.json'
|
||||
|
||||
const Icon = (
|
||||
{
|
||||
ref,
|
||||
...props
|
||||
}: React.SVGProps<SVGSVGElement> & {
|
||||
ref?: React.RefObject<React.RefObject<HTMLOrSVGElement>>
|
||||
},
|
||||
) => <IconBase {...props} ref={ref} data={data as IconData} />
|
||||
|
||||
Icon.displayName = 'FileDownload01'
|
||||
|
||||
export default Icon
|
||||
@ -3,6 +3,7 @@ export { default as CopyCheck } from './CopyCheck'
|
||||
export { default as File02 } from './File02'
|
||||
export { default as FileArrow01 } from './FileArrow01'
|
||||
export { default as FileCheck02 } from './FileCheck02'
|
||||
export { default as FileDownload01 } from './FileDownload01'
|
||||
export { default as FileDownload02 } from './FileDownload02'
|
||||
export { default as FilePlus01 } from './FilePlus01'
|
||||
export { default as FilePlus02 } from './FilePlus02'
|
||||
|
||||
@ -3,13 +3,12 @@ import type { InspectHeaderProps } from './inspect-layout'
|
||||
import type { SandboxFileTreeNode } from '@/types/sandbox-file'
|
||||
import {
|
||||
RiCloseLine,
|
||||
RiDownloadLine,
|
||||
RiMenuLine,
|
||||
} from '@remixicon/react'
|
||||
import { useCallback, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import ActionButton from '@/app/components/base/action-button'
|
||||
import CopyFeedback from '@/app/components/base/copy-feedback'
|
||||
import { FileDownload01 } from '@/app/components/base/icons/src/vender/line/files'
|
||||
import Loading from '@/app/components/base/loading'
|
||||
import ArtifactsTree from '@/app/components/workflow/skill/file-tree/artifacts-tree'
|
||||
import { useAppContext } from '@/context/app-context'
|
||||
@ -127,13 +126,12 @@ const ArtifactsTab: FC<InspectHeaderProps> = (headerProps) => {
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex shrink-0 items-center gap-1">
|
||||
<CopyFeedback content={file.path} />
|
||||
<ActionButton
|
||||
onClick={() => handleDownload(file)}
|
||||
disabled={downloadMutation.isPending}
|
||||
aria-label={`Download ${file.name}`}
|
||||
>
|
||||
<RiDownloadLine className="h-4 w-4" />
|
||||
<FileDownload01 className="h-4 w-4" />
|
||||
</ActionButton>
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user