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 names: Record<string, string> = {
'rmbg': '抠图',
'watermark': '去水印',
'enhance': '变清晰',
'extend': '图片扩展',
'resize': '尺寸调整',
'angle': '角度编辑',
'scene-fusion': '详情替换',
'annotate': '图片标注',
'text-edit': '编辑文字',
'note': '图片备注',
'prompt-regenerate': '提示词重绘',
'watermark': '去印',
'enhance': '增强',
'extend': '扩图',
'resize': '调尺',
'angle': '视角',
'scene-fusion': '替换',
'annotate': '标注',
'text-edit': '改字',
'note': '备注',
'prompt-regenerate': '重绘',
};
return names[action] || action;
};
@ -1599,35 +1599,35 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('watermark')}>
<Eraser className="h-4 w-4 mr-2" />
去水印
去印
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('enhance')}>
<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 onClick={() => handleAction('note')}>
<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
onClick={() => {
@ -1636,7 +1636,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
}}
>
<Pencil className="h-4 w-4 mr-2" />
重命名
改名
</DropdownMenuItem>
<DropdownMenuSeparator />
<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" />
)}
添加到对话
对话
</Button>
<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')}
>
<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
@ -1772,7 +1772,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
onClick={() => handleAction('rmbg')}
>
<Scissors className="mr-1.5 h-4 w-4" />
移除背景
抠图
</Button>
<Button
@ -1782,7 +1782,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
onClick={() => handleAction('watermark')}
>
<Eraser className="mr-1.5 h-4 w-4" />
擦除
去印
</Button>
<Button
@ -1795,7 +1795,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
}}
>
<Crosshair className="mr-1.5 h-4 w-4 text-orange-600" />
拾取物品
拾物
</Button>
<Button
@ -1805,7 +1805,7 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
onClick={() => handleAction('text-edit')}
>
<Type className="mr-1.5 h-4 w-4" />
编辑文字
改字
</Button>
<DropdownMenu>
@ -1820,25 +1820,25 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="center" side="bottom">
<DropdownMenuItem onClick={() => handleAction('note')}>
<StickyNote className="mr-2 h-4 w-4" />
图片备注
<DropdownMenuItem onClick={() => handleAction('extend')}>
<Expand className="mr-2 h-4 w-4" />
扩图
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('prompt-regenerate')}>
<RefreshCw className="mr-2 h-4 w-4" />
提示词重绘
重绘
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('angle')}>
<Move3D className="mr-2 h-4 w-4" />
角度编辑
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('extend')}>
<Expand className="mr-2 h-4 w-4" />
图片扩展
视角
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('resize')}>
<Maximize2 className="mr-2 h-4 w-4" />
尺寸调整
调尺
</DropdownMenuItem>
<DropdownMenuItem onClick={() => handleAction('note')}>
<StickyNote className="mr-2 h-4 w-4" />
备注
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem