fix: use icon-only image params control
This commit is contained in:
parent
b24acff972
commit
d04f43c464
@ -281,8 +281,6 @@ export function ImageParamsBar({
|
||||
// 内联模式:只返回参数按钮,嵌入工具栏
|
||||
if (inline) {
|
||||
const isDarkInline = inlineTheme === "dark";
|
||||
const ratioLabel = params.aspectRatio === "auto" ? "智能比例" : params.aspectRatio;
|
||||
const sizeLabel = params.imageSize;
|
||||
const outputSize = getComputedOutputSize(params.aspectRatio, params.imageSize);
|
||||
|
||||
return (
|
||||
@ -298,26 +296,22 @@ export function ImageParamsBar({
|
||||
<Button
|
||||
variant="ghost"
|
||||
className={cn(
|
||||
"h-8 min-w-0 max-w-[168px] shrink rounded-[12px] px-2 text-[11px] font-semibold",
|
||||
"h-8 w-11 shrink-0 rounded-[12px] p-0",
|
||||
isDarkInline
|
||||
? "border border-white/12 bg-white/[0.06] text-white hover:bg-white/[0.1]"
|
||||
: "border border-[#d6dbe2] bg-[#f3f4f6]/90 text-[#2f3b48] hover:bg-[#edeff2]/90"
|
||||
)}
|
||||
aria-label={`比例:${params.aspectRatio},分辨率:${params.imageSize}`}
|
||||
title={`比例:${params.aspectRatio},分辨率:${params.imageSize}`}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
"mr-1 flex h-3.5 w-3.5 items-center justify-center",
|
||||
"flex h-5 w-5 items-center justify-center",
|
||||
isDarkInline ? "text-white/80" : "text-[#20262f]"
|
||||
)}
|
||||
>
|
||||
{renderRatioGlyph(params.aspectRatio)}
|
||||
</span>
|
||||
<span className="truncate">{ratioLabel}</span>
|
||||
<span className={cn("mx-1.5 h-3 w-px", isDarkInline ? "bg-white/12" : "bg-[#cfd5de]")} />
|
||||
<span className="inline-flex min-w-0 items-center gap-0.5 truncate">
|
||||
{sizeLabel}
|
||||
</span>
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user