From f1650dc5e8108cc84dd978ebadd1d68a2cde0ec8 Mon Sep 17 00:00:00 2001 From: Titouan Compiegne Date: Fri, 9 Jun 2023 11:44:14 +0200 Subject: [PATCH] feat: better support AM Flow icons closes AM-610 --- src/lib/studio.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/lib/studio.js b/src/lib/studio.js index 6b98ca5f..6426f693 100644 --- a/src/lib/studio.js +++ b/src/lib/studio.js @@ -89,26 +89,9 @@ export function getFlowTitle(flow, collectionName, withMethods = true, draggable if (flow.condition) { rendering.push(html``); } - // TODO: Extract icon/shape on flow definition const methods = flow.methods || []; if (flow.type != null) { - let shape = null; - if (flow.type.toUpperCase() === 'ROOT') { - shape = 'home:earth'; - } else if (flow.type.toUpperCase() === 'LOGIN') { - shape = 'finance:file'; - } else if (flow.type.toUpperCase() === 'LOGIN_IDENTIFIER') { - shape = 'code:right-circle'; - } else if (flow.type.toUpperCase() === 'RESET_PASSWORD') { - shape = 'finance:protected-file'; - } else if (flow.type.toUpperCase() === 'CONSENT') { - shape = 'general:shield-check'; - } else if (flow.type.toUpperCase() === 'REGISTER') { - shape = 'communication:shield-user'; - } else if (flow.type.toUpperCase() === 'REGISTRATION_CONFIRMATION') { - shape = 'communication:clipboard-check'; - } - + const shape = flow.icon; if (shape != null) { rendering = [...rendering, html``]; }