Keep image migration pending until save confirmation

This commit is contained in:
2026-11-06 22:21:03 +08:00
parent 570cd53fc3
commit 776b665727
8 changed files with 23 additions and 17 deletions
+1 -1
View File
@@ -7,5 +7,5 @@ import styles from "./canvas.module.css";
export function PlainImageNode(props: NodeProps<CanvasNode>) {
const { zoom } = useViewport();
const preview = (props.width || 320) * zoom * (typeof window === "undefined" ? 1 : window.devicePixelRatio || 1) <= 1024;
return <TransformableNode {...props} className={styles.plainImageFrame}><img className={styles.plainImage} src={managedImageSource(props.data.src, preview)} alt={props.data.title} draggable={false} referrerPolicy="no-referrer" /></TransformableNode>;
return <TransformableNode {...props} className={styles.plainImageFrame}><img loading="lazy" decoding="async" className={styles.plainImage} src={managedImageSource(props.data.src, preview)} alt={props.data.title} draggable={false} referrerPolicy="no-referrer" /></TransformableNode>;
}