diff --git a/web/app/components/base/icons/assets/public/knowledge/layout-right-2-line-mod.svg b/web/app/components/base/icons/assets/public/knowledge/layout-right-2-line-mod.svg new file mode 100644 index 0000000000..188f9b55a3 --- /dev/null +++ b/web/app/components/base/icons/assets/public/knowledge/layout-right-2-line-mod.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/web/app/components/base/icons/src/public/knowledge/LayoutRight2LineMod.json b/web/app/components/base/icons/src/public/knowledge/LayoutRight2LineMod.json new file mode 100644 index 0000000000..26c5cf1d4f --- /dev/null +++ b/web/app/components/base/icons/src/public/knowledge/LayoutRight2LineMod.json @@ -0,0 +1,36 @@ +{ + "icon": { + "type": "element", + "isRootNode": true, + "name": "svg", + "attributes": { + "width": "16", + "height": "16", + "viewBox": "0 0 16 16", + "fill": "none", + "xmlns": "http://www.w3.org/2000/svg" + }, + "children": [ + { + "type": "element", + "name": "g", + "attributes": { + "id": "Icon L" + }, + "children": [ + { + "type": "element", + "name": "path", + "attributes": { + "id": "Vector", + "d": "M14.0002 2C14.3684 2 14.6668 2.29848 14.6668 2.66667V13.3333C14.6668 13.7015 14.3684 14 14.0002 14H2.00016C1.63198 14 1.3335 13.7015 1.3335 13.3333V2.66667C1.3335 2.29848 1.63198 2 2.00016 2H14.0002ZM13.3335 3.33333H2.66683V12.6667H13.3335V3.33333ZM14.0002 2.66667V13.3333H10.0002V2.66667H14.0002Z", + "fill": "#354052" + }, + "children": [] + } + ] + } + ] + }, + "name": "LayoutRight2LineMod" +} \ No newline at end of file diff --git a/web/app/components/base/icons/src/public/knowledge/LayoutRight2LineMod.tsx b/web/app/components/base/icons/src/public/knowledge/LayoutRight2LineMod.tsx new file mode 100644 index 0000000000..2189893eb3 --- /dev/null +++ b/web/app/components/base/icons/src/public/knowledge/LayoutRight2LineMod.tsx @@ -0,0 +1,16 @@ +// GENERATE BY script +// DON NOT EDIT IT MANUALLY + +import * as React from 'react' +import data from './LayoutRight2LineMod.json' +import IconBase from '@/app/components/base/icons/IconBase' +import type { IconBaseProps, IconData } from '@/app/components/base/icons/IconBase' + +const Icon = React.forwardRef, Omit>(( + props, + ref, +) => ) + +Icon.displayName = 'LayoutRight2LineMod' + +export default Icon diff --git a/web/app/components/base/icons/src/public/knowledge/index.ts b/web/app/components/base/icons/src/public/knowledge/index.ts index 86300c9ee3..0af2cf341d 100644 --- a/web/app/components/base/icons/src/public/knowledge/index.ts +++ b/web/app/components/base/icons/src/public/knowledge/index.ts @@ -1,5 +1,6 @@ export { default as Chunk } from './Chunk' export { default as Collapse } from './Collapse' export { default as GeneralType } from './GeneralType' +export { default as LayoutRight2LineMod } from './LayoutRight2LineMod' export { default as ParentChildType } from './ParentChildType' export { default as SelectionMod } from './SelectionMod' diff --git a/web/app/components/datasets/documents/detail/index.tsx b/web/app/components/datasets/documents/detail/index.tsx index 25fe7f5a8f..1d323ec995 100644 --- a/web/app/components/datasets/documents/detail/index.tsx +++ b/web/app/components/datasets/documents/detail/index.tsx @@ -26,6 +26,7 @@ import type { DocForm, DocumentItem, ParentMode, ProcessMode } from '@/models/da import { useDatasetDetailContext } from '@/context/dataset-detail' import FloatRightContainer from '@/app/components/base/float-right-container' import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' +import { LayoutRight2LineMod } from '@/app/components/base/icons/src/public/knowledge' type DocumentContextValue = { datasetId?: string @@ -207,7 +208,7 @@ const DocumentDetail: FC = ({ datasetId, documentId }) => { processMode={documentDetail?.dataset_process_rule?.mode} />
- {embeddingAvailable && documentDetail && !documentDetail.archived && ( + {embeddingAvailable && documentDetail && !documentDetail.archived && !isFullDocMode && ( = ({ datasetId, documentId }) => { className={style.layoutRightIcon} onClick={() => setShowMetadata(!showMetadata)} > - {/* // todo: change icon */} - + { + showMetadata + ? + : + }