chore: reorder image toolbar shortcuts labels
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-02-20 23:33:50 +08:00
parent c80b46d43c
commit 225ab8c02f

View File

@ -991,16 +991,16 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
const getActionName = (action: string): string => { const getActionName = (action: string): string => {
const names: Record<string, string> = { const names: Record<string, string> = {
'rmbg': '抠图', 'rmbg': '抠图',
'watermark': '去水印', 'watermark': '去印',
'enhance': '变清晰', 'enhance': '增强',
'extend': '图片扩展', 'extend': '扩图',
'resize': '尺寸调整', 'resize': '调尺',
'angle': '角度编辑', 'angle': '视角',
'scene-fusion': '详情替换', 'scene-fusion': '替换',
'annotate': '图片标注', 'annotate': '标注',
'text-edit': '编辑文字', 'text-edit': '改字',
'note': '图片备注', 'note': '备注',
'prompt-regenerate': '提示词重绘', 'prompt-regenerate': '重绘',
}; };
return names[action] || action; return names[action] || action;
}; };
@ -1599,35 +1599,35 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('watermark')}> <DropdownMenuItem onClick={() => handleAction('watermark')}>
<Eraser className="h-4 w-4 mr-2" /> <Eraser className="h-4 w-4 mr-2" />
去水印 去印
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('enhance')}> <DropdownMenuItem onClick={() => handleAction('enhance')}>
<Sparkles className="h-4 w-4 mr-2" /> <Sparkles className="h-4 w-4 mr-2" />
变清晰 增强
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('extend')}>
<Expand className="h-4 w-4 mr-2" />
图片扩展
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('resize')}>
<Maximize2 className="h-4 w-4 mr-2" />
尺寸调整
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('angle')}>
<Move3D className="h-4 w-4 mr-2" />
角度编辑
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('prompt-regenerate')}>
<RefreshCw className="h-4 w-4 mr-2" />
提示词重绘
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('text-edit')}>
<Type className="h-4 w-4 mr-2" />
编辑文字
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('note')}> <DropdownMenuItem onClick={() => handleAction('note')}>
<StickyNote className="h-4 w-4 mr-2" /> <StickyNote className="h-4 w-4 mr-2" />
图片备注 备注
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('resize')}>
<Maximize2 className="h-4 w-4 mr-2" />
调尺
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('angle')}>
<Move3D className="h-4 w-4 mr-2" />
视角
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('prompt-regenerate')}>
<RefreshCw className="h-4 w-4 mr-2" />
重绘
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('text-edit')}>
<Type className="h-4 w-4 mr-2" />
改字
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('extend')}>
<Expand className="h-4 w-4 mr-2" />
扩图
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem <DropdownMenuItem
onClick={() => { onClick={() => {
@ -1636,7 +1636,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
}} }}
> >
<Pencil className="h-4 w-4 mr-2" /> <Pencil className="h-4 w-4 mr-2" />
重命名 改名
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuSeparator /> <DropdownMenuSeparator />
<DropdownMenuItem onClick={handleDownload}> <DropdownMenuItem onClick={handleDownload}>
@ -1750,7 +1750,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
) : ( ) : (
<MessageSquarePlus className="mr-1.5 h-4 w-4 text-blue-600" /> <MessageSquarePlus className="mr-1.5 h-4 w-4 text-blue-600" />
)} )}
添加到对话 对话
</Button> </Button>
<div className="mx-1 h-5 w-px bg-slate-200 dark:bg-slate-700" /> <div className="mx-1 h-5 w-px bg-slate-200 dark:bg-slate-700" />
@ -1762,7 +1762,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
onClick={() => handleAction('enhance')} onClick={() => handleAction('enhance')}
> >
<span className="mr-1.5 rounded-md border border-slate-300 px-1.5 text-[11px] leading-5 text-slate-600 dark:border-slate-500 dark:text-slate-100">HD</span> <span className="mr-1.5 rounded-md border border-slate-300 px-1.5 text-[11px] leading-5 text-slate-600 dark:border-slate-500 dark:text-slate-100">HD</span>
放大 增强
</Button> </Button>
<Button <Button
@ -1772,7 +1772,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
onClick={() => handleAction('rmbg')} onClick={() => handleAction('rmbg')}
> >
<Scissors className="mr-1.5 h-4 w-4" /> <Scissors className="mr-1.5 h-4 w-4" />
移除背景 抠图
</Button> </Button>
<Button <Button
@ -1782,7 +1782,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
onClick={() => handleAction('watermark')} onClick={() => handleAction('watermark')}
> >
<Eraser className="mr-1.5 h-4 w-4" /> <Eraser className="mr-1.5 h-4 w-4" />
擦除 去印
</Button> </Button>
<Button <Button
@ -1795,7 +1795,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
}} }}
> >
<Crosshair className="mr-1.5 h-4 w-4 text-orange-600" /> <Crosshair className="mr-1.5 h-4 w-4 text-orange-600" />
拾取物品 拾物
</Button> </Button>
<Button <Button
@ -1805,7 +1805,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
onClick={() => handleAction('text-edit')} onClick={() => handleAction('text-edit')}
> >
<Type className="mr-1.5 h-4 w-4" /> <Type className="mr-1.5 h-4 w-4" />
编辑文字 改字
</Button> </Button>
<DropdownMenu> <DropdownMenu>
@ -1820,25 +1820,25 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
</Button> </Button>
</DropdownMenuTrigger> </DropdownMenuTrigger>
<DropdownMenuContent align="center" side="bottom"> <DropdownMenuContent align="center" side="bottom">
<DropdownMenuItem onClick={() => handleAction('note')}> <DropdownMenuItem onClick={() => handleAction('extend')}>
<StickyNote className="mr-2 h-4 w-4" /> <Expand className="mr-2 h-4 w-4" />
图片备注 扩图
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('prompt-regenerate')}> <DropdownMenuItem onClick={() => handleAction('prompt-regenerate')}>
<RefreshCw className="mr-2 h-4 w-4" /> <RefreshCw className="mr-2 h-4 w-4" />
提示词重绘 重绘
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('angle')}> <DropdownMenuItem onClick={() => handleAction('angle')}>
<Move3D className="mr-2 h-4 w-4" /> <Move3D className="mr-2 h-4 w-4" />
角度编辑 视角
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('extend')}>
<Expand className="mr-2 h-4 w-4" />
图片扩展
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('resize')}> <DropdownMenuItem onClick={() => handleAction('resize')}>
<Maximize2 className="mr-2 h-4 w-4" /> <Maximize2 className="mr-2 h-4 w-4" />
尺寸调整 调尺
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('note')}>
<StickyNote className="mr-2 h-4 w-4" />
备注
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuSeparator /> <DropdownMenuSeparator />
<DropdownMenuItem <DropdownMenuItem