Skip to content

Commit

Permalink
feat: better support AM Flow icons
Browse files Browse the repository at this point in the history
closes AM-610
  • Loading branch information
Titouan Compiegne authored and gcusnieux committed Jun 9, 2023
1 parent c94d12a commit f1650dc
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/lib/studio.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,9 @@ export function getFlowTitle(flow, collectionName, withMethods = true, draggable
if (flow.condition) {
rendering.push(html`<gv-icon title="Conditional flow" class="content-icon-conditional" shape="code:if"></gv-icon>`);
}
// 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`<gv-icon title="${flow.type}" shape="${shape}" class="icon-type"></gv-icon>`];
}
Expand Down

0 comments on commit f1650dc

Please sign in to comment.