This commit is contained in:
2026-03-08 00:04:27 +01:00
parent c0a4ee4ec8
commit 9e5fada009
4 changed files with 22 additions and 19 deletions

View File

@@ -62,14 +62,14 @@ const DEFAULT_DATA: Record<string, any> = {
export function getDefaultDataForType(type: string, newId?: string): any {
const base = { ...DEFAULT_DATA[type] }
if (type === 'config' && newId) base.title = `config-${newId}`
if (type === 'config' && newId) base.title = `${newId}`
return base
}
/** Data for Reset action: clears code completely for config/function; same as default for others */
export function getResetDataForType(type: string, nodeId?: string): any {
if (type === 'config') {
return { plantuml: '@startuml\n\n@enduml\n', title: nodeId ? `config-${nodeId}` : '' }
return { plantuml: '@startuml\n\n@enduml\n', title: nodeId ? `${nodeId}` : '' }
}
if (type === 'function') {
return { body: '' }