fix(canvas): use icon compare toggle and move it away from prompt overlay
This commit is contained in:
parent
d11fd0825d
commit
0933ec4ce9
@ -1660,13 +1660,30 @@ export function ImageNode({ node, isSelected }: ImageNodeProps) {
|
|||||||
{isSelected && !isMultiSelected && hasCompareSource && !isThisNodePicking && (
|
{isSelected && !isMultiSelected && hasCompareSource && !isThisNodePicking && (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="absolute bottom-2 right-2 rounded-md bg-black/70 px-2 py-1 text-[11px] font-medium text-white transition-colors hover:bg-black/80"
|
className="absolute top-2 right-2 z-40 inline-flex h-8 w-8 items-center justify-center rounded-full border border-white/70 bg-black/70 text-white transition-colors hover:bg-black/80"
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
setIsCompareMode((prev) => !prev);
|
setIsCompareMode((prev) => !prev);
|
||||||
}}
|
}}
|
||||||
|
title={isCompareMode ? "退出对比" : "开启对比"}
|
||||||
|
aria-label={isCompareMode ? "退出对比" : "开启对比"}
|
||||||
>
|
>
|
||||||
{isCompareMode ? "退出对比" : "对比显示"}
|
{isCompareMode ? (
|
||||||
|
<X className="h-4 w-4" />
|
||||||
|
) : (
|
||||||
|
<svg
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
className="h-4 w-4"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="2"
|
||||||
|
strokeLinecap="round"
|
||||||
|
strokeLinejoin="round"
|
||||||
|
>
|
||||||
|
<rect x="3" y="5" width="18" height="14" rx="2" />
|
||||||
|
<path d="M12 5v14" />
|
||||||
|
</svg>
|
||||||
|
)}
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user