SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
Refactor button structure and styles in left sidebar component
Muhammad Hamza Khan4ba5c24981d6
diff --git a/packages/app/src/builder-ui/utils/component.utils/index.ts b/packages/app/src/builder-ui/utils/component.utils/index.tsindex 1c88ce3c..c7aadefd 100644--- a/packages/app/src/builder-ui/utils/component.utils/index.ts+++ b/packages/app/src/builder-ui/utils/component.utils/index.ts@@ -418,7 +418,7 @@ const _compMenuMarkup = ({ data, compName, placeholderLogo, compDisplayName }: C}let deleteBtn = `<button- class="btn-delete w-1 h-2 p-0"+ class="btn-delete"rel="${data?.id || ''}"aria-label="Delete ${data?.name || 'item'}">@@ -1132,3 +1132,4 @@ export function addTooltipToLockBadge(element, tooltipText) {export { default as PromptGeneratorUtils } from './PromptGenerator.utils';export { default as VisionLLMUtils } from './VisionLLM.utils';+diff --git a/packages/app/static/css/smyth-builder.css b/packages/app/static/css/smyth-builder.cssindex a606ce79..cdc166af 100644--- a/packages/app/static/css/smyth-builder.css+++ b/packages/app/static/css/smyth-builder.css@@ -1477,7 +1477,6 @@ ul.agents-list-dlg .btn-delete {}.comp-menuitem-list .btn-delete {- padding: 10px 15px !important;display: flex;align-items: center;}diff --git a/packages/app/views/pages/partials/studio/left-sidebar-cptItem.ejs b/packages/app/views/pages/partials/studio/left-sidebar-cptItem.ejsindex 34d582f7..75f33f53 100644--- a/packages/app/views/pages/partials/studio/left-sidebar-cptItem.ejs+++ b/packages/app/views/pages/partials/studio/left-sidebar-cptItem.ejs@@ -49,20 +49,22 @@<% if (typeof externalLink !== 'undefined') { %><a href="<%= externalLink %>" target="_blank" rel="noopener noreferrer"class="group flex items-center justify-between h-full pr-2 text-sm rounded-md bg-white <%=level==1 ? 'mx-2 pl-2': 'pl-1'%> text-black">- <% if (icon) { %>- <span class="icon" style="<%= cssstyle %>">- <% if (icon.startsWith('fa')) { %>- <i class="<%= icon %>"></i>- <% } else if (icon.trim().startsWith('<svg')) { %>- <span class="svg-icon w-6 h-6">- <%- icon.match(/<path(?=.*?\sfill="[^"]*")[^>]*>/gm) ? icon : icon.replace(/<path /gm, '<path style="'+svgstyle+'"') %>- </span>- <% } else { %>- <span class="svg-icon <%= icon %> w-6 h-6"></span>- <% } %>- </span>- <% } %>- <span class="name flex-1 whitespace-nowrap truncate"><%= label %></span>+ <span class="flex items-center gap-2">+ <% if (icon) { %>+ <span class="icon" style="<%= cssstyle %>">+ <% if (icon.startsWith('fa')) { %>+ <i class="<%= icon %>"></i>+ <% } else if (icon.trim().startsWith('<svg')) { %>+ <span class="svg-icon w-6 h-6">+ <%- icon.match(/<path(?=.*?\sfill="[^"]*")[^>]*>/gm) ? icon : icon.replace(/<path /gm, '<path style="'+svgstyle+'"') %>+ </span>+ <% } else { %>+ <span class="svg-icon <%= icon %> w-6 h-6"></span>+ <% } %>+ </span>+ <% } %>+ <span class="name flex-1 whitespace-nowrap truncate"><%= label %></span>+ </span><span class="external-link-icon"><svg class="w-4 h-4" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 3C3.22386 3 3 3.22386 3 3.5C3 3.77614 3.22386 4 3.5 4H7.29289L2.64645 8.64645C2.45118 8.84171 2.45118 9.15829 2.64645 9.35355C2.84171 9.54882 3.15829 9.54882 3.35355 9.35355L8 4.70711V8.5C8 8.77614 8.22386 9 8.5 9C8.77614 9 9 8.77614 9 8.5V3.5C9 3.22386 8.77614 3 8.5 3H3.5Z" fill="currentColor"/>@@ -75,19 +77,22 @@smt-component="<%= name %>" <% for (const attr in attributes) { %><%= attr %>="<%= attributes[attr] %>"<% } %>>- <span class="icon" style="<%= cssstyle %>">- <% if (icon?.startsWith('fa')) { %>- <i class="<%= icon %>"></i>- <% } else if (icon?.trim()?.startsWith('<svg')) { %>- <span class="svg-icon w-6 h-6">- <%- icon?.match(/<path(?=.*?\sfill="[^"]*")[^>]*>/gm) ? icon : icon?.replace(/<path /gm, '<path style="'+svgstyle+'"') %>- </span>- <% } else { %>- <span class="svg-icon <%= icon %> w-6 h-6"></span>- <% } %>- </span>+ <span class="flex items-center gap-2">- <span class="name flex-1 whitespace-nowrap truncate"><%= label %></span>+ <span class="icon" style="<%= cssstyle %>">+ <% if (icon?.startsWith('fa')) { %>+ <i class="<%= icon %>"></i>+ <% } else if (icon?.trim()?.startsWith('<svg')) { %>+ <span class="svg-icon w-6 h-6">+ <%- icon?.match(/<path(?=.*?\sfill="[^"]*")[^>]*>/gm) ? icon : icon?.replace(/<path /gm, '<path style="'+svgstyle+'"') %>+ </span>+ <% } else { %>+ <span class="svg-icon <%= icon %> w-6 h-6"></span>+ <% } %>+ </span>++ <span class="name flex-1 whitespace-nowrap truncate"><%= label %></span>+ </span><span class="cursor-grab [.dragging_&]:hidden"><svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">