mirror of
https://github.com/langgenius/dify.git
synced 2026-04-27 02:36:29 +08:00
improve comment cursor icon
This commit is contained in:
parent
48cd7e6481
commit
31cba28e8a
@ -0,0 +1,3 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="12" viewBox="0 0 14 12" fill="none">
|
||||||
|
<path d="M12.3334 4C12.3334 2.52725 11.1395 1.33333 9.66671 1.33333H4.33337C2.86062 1.33333 1.66671 2.52724 1.66671 4V10.6667H9.66671C11.1395 10.6667 12.3334 9.47274 12.3334 8V4ZM7.66671 6.66667V8H4.33337V6.66667H7.66671ZM9.66671 4V5.33333H4.33337V4H9.66671ZM13.6667 8C13.6667 10.2091 11.8758 12 9.66671 12H0.333374V4C0.333374 1.79086 2.12424 0 4.33337 0H9.66671C11.8758 0 13.6667 1.79086 13.6667 4V8Z" fill="currentColor"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 527 B |
26
web/app/components/base/icons/src/public/other/Comment.json
Normal file
26
web/app/components/base/icons/src/public/other/Comment.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"icon": {
|
||||||
|
"type": "element",
|
||||||
|
"isRootNode": true,
|
||||||
|
"name": "svg",
|
||||||
|
"attributes": {
|
||||||
|
"xmlns": "http://www.w3.org/2000/svg",
|
||||||
|
"width": "14",
|
||||||
|
"height": "12",
|
||||||
|
"viewBox": "0 0 14 12",
|
||||||
|
"fill": "none"
|
||||||
|
},
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"type": "element",
|
||||||
|
"name": "path",
|
||||||
|
"attributes": {
|
||||||
|
"d": "M12.3334 4C12.3334 2.52725 11.1395 1.33333 9.66671 1.33333H4.33337C2.86062 1.33333 1.66671 2.52724 1.66671 4V10.6667H9.66671C11.1395 10.6667 12.3334 9.47274 12.3334 8V4ZM7.66671 6.66667V8H4.33337V6.66667H7.66671ZM9.66671 4V5.33333H4.33337V4H9.66671ZM13.6667 8C13.6667 10.2091 11.8758 12 9.66671 12H0.333374V4C0.333374 1.79086 2.12424 0 4.33337 0H9.66671C11.8758 0 13.6667 1.79086 13.6667 4V8Z",
|
||||||
|
"fill": "currentColor"
|
||||||
|
},
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"name": "Comment"
|
||||||
|
}
|
||||||
20
web/app/components/base/icons/src/public/other/Comment.tsx
Normal file
20
web/app/components/base/icons/src/public/other/Comment.tsx
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
// GENERATE BY script
|
||||||
|
// DON NOT EDIT IT MANUALLY
|
||||||
|
|
||||||
|
import * as React from 'react'
|
||||||
|
import data from './Comment.json'
|
||||||
|
import IconBase from '@/app/components/base/icons/IconBase'
|
||||||
|
import type { IconData } from '@/app/components/base/icons/IconBase'
|
||||||
|
|
||||||
|
const Icon = (
|
||||||
|
{
|
||||||
|
ref,
|
||||||
|
...props
|
||||||
|
}: React.SVGProps<SVGSVGElement> & {
|
||||||
|
ref?: React.RefObject<React.RefObject<HTMLOrSVGElement>>;
|
||||||
|
},
|
||||||
|
) => <IconBase {...props} ref={ref} data={data as IconData} />
|
||||||
|
|
||||||
|
Icon.displayName = 'Comment'
|
||||||
|
|
||||||
|
export default Icon
|
||||||
@ -1,4 +1,5 @@
|
|||||||
export { default as Icon3Dots } from './Icon3Dots'
|
export { default as Icon3Dots } from './Icon3Dots'
|
||||||
|
export { default as Comment } from './Comment'
|
||||||
export { default as DefaultToolIcon } from './DefaultToolIcon'
|
export { default as DefaultToolIcon } from './DefaultToolIcon'
|
||||||
export { default as Message3Fill } from './Message3Fill'
|
export { default as Message3Fill } from './Message3Fill'
|
||||||
export { default as RowStruct } from './RowStruct'
|
export { default as RowStruct } from './RowStruct'
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import type { FC } from 'react'
|
|||||||
import { memo } from 'react'
|
import { memo } from 'react'
|
||||||
import { useStore } from '../store'
|
import { useStore } from '../store'
|
||||||
import { ControlMode } from '../types'
|
import { ControlMode } from '../types'
|
||||||
|
import { Comment } from '@/app/components/base/icons/src/public/other'
|
||||||
|
|
||||||
type CommentCursorProps = {
|
type CommentCursorProps = {
|
||||||
mousePosition: { elementX: number; elementY: number }
|
mousePosition: { elementX: number; elementY: number }
|
||||||
@ -22,10 +23,7 @@ export const CommentCursor: FC<CommentCursorProps> = memo(({ mousePosition }) =>
|
|||||||
transform: 'translate(-50%, -50%)',
|
transform: 'translate(-50%, -50%)',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
|
<Comment />
|
||||||
<path d="M10.5 6.33325H5.5H10.5ZM8 9.66658H5.5H8ZM0.5 14.6666H11.3333C13.6345 14.6666 15.5 12.8011 15.5 10.4999V5.49992C15.5 3.19874 13.6345 1.33325 11.3333 1.33325H4.66667C2.36548 1.33325 0.5 3.19874 0.5 5.49992V14.6666Z" fill="white"/>
|
|
||||||
<path d="M10.5 6.33325H5.5M8 9.66658H5.5M0.5 14.6666H11.3333C13.6345 14.6666 15.5 12.8011 15.5 10.4999V5.49992C15.5 3.19874 13.6345 1.33325 11.3333 1.33325H4.66667C2.36548 1.33325 0.5 3.19874 0.5 5.49992V14.6666Z" stroke="black"/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -9,9 +9,9 @@ import {
|
|||||||
RiCursorLine,
|
RiCursorLine,
|
||||||
RiFunctionAddLine,
|
RiFunctionAddLine,
|
||||||
RiHand,
|
RiHand,
|
||||||
RiMessage3Line,
|
|
||||||
RiStickyNoteAddLine,
|
RiStickyNoteAddLine,
|
||||||
} from '@remixicon/react'
|
} from '@remixicon/react'
|
||||||
|
import { Comment } from '@/app/components/base/icons/src/public/other'
|
||||||
import {
|
import {
|
||||||
useNodesReadOnly,
|
useNodesReadOnly,
|
||||||
useWorkflowCanvasMaximize,
|
useWorkflowCanvasMaximize,
|
||||||
@ -106,7 +106,7 @@ const Control = () => {
|
|||||||
)}
|
)}
|
||||||
onClick={addComment}
|
onClick={addComment}
|
||||||
>
|
>
|
||||||
<RiMessage3Line className='h-4 w-4' />
|
<Comment className='h-4 w-4' />
|
||||||
</div>
|
</div>
|
||||||
</TipPopup>
|
</TipPopup>
|
||||||
<Divider className='my-1 w-3.5' />
|
<Divider className='my-1 w-3.5' />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user