feat: create a new canvas by copying an existing one
Add a 'Copy from existing' option to the New Canvas modal. It lists every
canvas with node/group/text counts; picking one deep-copies its nodes, edges,
parent/child links and canvas state (viewport, custom style, floor plan) into
a fresh design.
Backend: POST /designs/{source_id}/copy remaps node ids, re-points edges and
parent links, and clones canvas state; GET /designs now returns per-design
counts for the picker. Standalone mode clones the localStorage canvas.
Closes #216
ha-relevant: maybe
This commit is contained in:
@@ -8,6 +8,10 @@ export interface Design {
|
||||
icon?: string | null
|
||||
created_at: string
|
||||
updated_at: string
|
||||
/** Populated by the design list endpoint for the "copy from existing" picker. */
|
||||
node_count?: number | null
|
||||
group_count?: number | null
|
||||
text_count?: number | null
|
||||
}
|
||||
|
||||
export type NodeType =
|
||||
|
||||
Reference in New Issue
Block a user