diff --git a/.claude/launch.json b/.claude/launch.json new file mode 100644 index 0000000..1f99702 --- /dev/null +++ b/.claude/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.0.1", + "configurations": [ + { + "name": "client", + "runtimeExecutable": "pnpm", + "runtimeArgs": ["--filter", "client", "dev"], + "port": 5173 + } + ] +} diff --git a/apps/client/src/components/FieldCanvas.tsx b/apps/client/src/components/FieldCanvas.tsx index a24785e..4738afb 100644 --- a/apps/client/src/components/FieldCanvas.tsx +++ b/apps/client/src/components/FieldCanvas.tsx @@ -30,6 +30,7 @@ interface FieldCanvasProps { onAdd: (type: FieldType, insertIndex?: number) => void; onReorder: (fields: BuilderField[]) => void; onRemove: (id: string) => void; + isDirty?: boolean; } interface BuilderDndProviderProps { @@ -201,6 +202,7 @@ export function FieldCanvas({ selectedId, onSelect, onRemove, + isDirty = false, }: Omit) { const { t } = useI18n(); const { active, over } = useDndContext(); @@ -226,7 +228,22 @@ export function FieldCanvas({

{t('builder.canvas.title')}

- {t('builder.saveDraft.label')} + + {isDirty ? ( + <> +