feat: new icons (#5412)

This commit is contained in:
zxhlyh
2024-06-20 11:05:08 +08:00
committed by GitHub
parent 0105129fa8
commit 2328ed8ffa
338 changed files with 880 additions and 3669 deletions

View File

@@ -4,6 +4,7 @@ import {
useState,
} from 'react'
import cn from 'classnames'
import { RiAddCircleFill } from '@remixicon/react'
import { useStoreApi } from 'reactflow'
import { useTranslation } from 'react-i18next'
import type { OffsetOptions } from '@floating-ui/react'
@@ -19,7 +20,6 @@ import { NODES_INITIAL_DATA } from '../constants'
import { useWorkflowStore } from '../store'
import TipPopup from './tip-popup'
import BlockSelector from '@/app/components/workflow/block-selector'
import { Plus } from '@/app/components/base/icons/src/vender/line/general'
import type {
OnSelectBlock,
} from '@/app/components/workflow/types'
@@ -82,7 +82,7 @@ const AddBlock = ({
`${nodesReadOnly && '!cursor-not-allowed opacity-50'}`,
open && '!bg-black/5',
)}>
<Plus className='w-4 h-4' />
<RiAddCircleFill className='w-4 h-4' />
</div>
</TipPopup>
)

View File

@@ -5,6 +5,12 @@ import {
} from 'react'
import { useTranslation } from 'react-i18next'
import cn from 'classnames'
import {
RiCursorLine,
RiFunctionAddLine,
RiHand,
RiStickyNoteAddLine,
} from '@remixicon/react'
import { useKeyPress } from 'ahooks'
import {
useNodesReadOnly,
@@ -16,16 +22,6 @@ import { useStore } from '../store'
import AddBlock from './add-block'
import TipPopup from './tip-popup'
import { useOperator } from './hooks'
import {
Cursor02C,
Hand02,
} from '@/app/components/base/icons/src/vender/line/editor'
import {
Cursor02C as Cursor02CSolid,
Hand02 as Hand02Solid,
} from '@/app/components/base/icons/src/vender/solid/editor'
import { OrganizeGrid } from '@/app/components/base/icons/src/vender/line/layout'
import { StickerSquare } from '@/app/components/base/icons/src/vender/line/files'
const Control = () => {
const { t } = useTranslation()
@@ -101,7 +97,7 @@ const Control = () => {
)}
onClick={addNote}
>
<StickerSquare />
<RiStickyNoteAddLine className='w-4 h-4' />
</div>
</TipPopup>
<div className='mx-[3px] w-[1px] h-3.5 bg-gray-200'></div>
@@ -114,9 +110,7 @@ const Control = () => {
)}
onClick={handleModePointer}
>
{
controlMode === 'pointer' ? <Cursor02CSolid className='w-4 h-4' /> : <Cursor02C className='w-4 h-4' />
}
<RiCursorLine className='w-4 h-4' />
</div>
</TipPopup>
<TipPopup title={t('workflow.common.handMode')}>
@@ -128,9 +122,7 @@ const Control = () => {
)}
onClick={handleModeHand}
>
{
controlMode === 'hand' ? <Hand02Solid className='w-4 h-4' /> : <Hand02 className='w-4 h-4' />
}
<RiHand className='w-4 h-4' />
</div>
</TipPopup>
<div className='mx-[3px] w-[1px] h-3.5 bg-gray-200'></div>
@@ -142,7 +134,7 @@ const Control = () => {
)}
onClick={goLayout}
>
<OrganizeGrid className='w-4 h-4' />
<RiFunctionAddLine className='w-4 h-4' />
</div>
</TipPopup>
</div>

View File

@@ -6,6 +6,10 @@ import {
useState,
} from 'react'
import cn from 'classnames'
import {
RiZoomInLine,
RiZoomOutLine,
} from '@remixicon/react'
import { useKeyPress } from 'ahooks'
import { useTranslation } from 'react-i18next'
import {
@@ -28,10 +32,6 @@ import {
PortalToFollowElemContent,
PortalToFollowElemTrigger,
} from '@/app/components/base/portal-to-follow-elem'
import {
ZoomIn,
ZoomOut,
} from '@/app/components/base/icons/src/vender/line/editor'
enum ZoomType {
zoomIn = 'zoomIn',
@@ -234,7 +234,7 @@ const ZoomInOut: FC = () => {
zoomOut()
}}
>
<ZoomOut className='w-4 h-4' />
<RiZoomOutLine className='w-4 h-4' />
</div>
</TipPopup>
<div className='w-[34px]'>{parseFloat(`${zoom * 100}`).toFixed(0)}%</div>
@@ -249,7 +249,7 @@ const ZoomInOut: FC = () => {
zoomIn()
}}
>
<ZoomIn className='w-4 h-4' />
<RiZoomInLine className='w-4 h-4' />
</div>
</TipPopup>
</div>