mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-01 18:35:00 -05:00
Rename Block suffix from blocks names in builder
This commit is contained in:
@@ -57,7 +57,7 @@ export const Block: BlockComponent = ({
|
||||
// preview when user drags it
|
||||
const dragPreview = document.createElement("div");
|
||||
dragPreview.style.cssText = blockDragPreviewStyle;
|
||||
dragPreview.textContent = beautifyString(title || "");
|
||||
dragPreview.textContent = beautifyString(title || "").replace(/ Block$/, "");
|
||||
|
||||
document.body.appendChild(dragPreview);
|
||||
e.dataTransfer.setDragImage(dragPreview, 0, 0);
|
||||
@@ -90,7 +90,7 @@ export const Block: BlockComponent = ({
|
||||
"line-clamp-1 font-sans text-sm font-medium leading-[1.375rem] text-zinc-800 group-disabled:text-zinc-400",
|
||||
)}
|
||||
>
|
||||
{highlightText(beautifyString(title), highlightedText)}
|
||||
{highlightText(beautifyString(title).replace(/ Block$/, ""), highlightedText)}
|
||||
</span>
|
||||
)}
|
||||
{description && (
|
||||
|
||||
@@ -61,7 +61,7 @@ export const IntegrationBlock: IntegrationBlockComponent = ({
|
||||
// preview when user drags it
|
||||
const dragPreview = document.createElement("div");
|
||||
dragPreview.style.cssText = blockDragPreviewStyle;
|
||||
dragPreview.textContent = beautifyString(title || "");
|
||||
dragPreview.textContent = beautifyString(title || "").replace(/ Block$/, "");
|
||||
|
||||
document.body.appendChild(dragPreview);
|
||||
e.dataTransfer.setDragImage(dragPreview, 0, 0);
|
||||
@@ -100,7 +100,7 @@ export const IntegrationBlock: IntegrationBlockComponent = ({
|
||||
"line-clamp-1 font-sans text-sm font-medium leading-[1.375rem] text-zinc-800 group-disabled:text-zinc-400",
|
||||
)}
|
||||
>
|
||||
{highlightText(beautifyString(title), highlightedText)}
|
||||
{highlightText(beautifyString(title).replace(/ Block$/, ""), highlightedText)}
|
||||
</span>
|
||||
)}
|
||||
{description && (
|
||||
|
||||
Reference in New Issue
Block a user