Skip to content

Commit a3c46c2

Browse files
committed
fix: some bugfix
1 parent 3563aee commit a3c46c2

4 files changed

Lines changed: 21 additions & 18 deletions

File tree

src/frontend/platform/src/pages/BuildPage/flow/FlowNode/component/ConditionItem.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ const Item = ({ nodeId, item, index, del, required, varErrors, onUpdateItem, onD
142142
className={`${required && !item.right_value && 'border-red-500'} h-8`}
143143
/>
144144
)}
145-
{del && (
146-
<Trash2
147-
size={18}
148-
onClick={() => onDeleteItem(index)}
149-
className="min-w-5 hover:text-red-600 cursor-pointer hover-reveal-child"
150-
/>
151-
)}
152145
</>
153146
)}
147+
{del && (
148+
<Trash2
149+
size={18}
150+
onClick={() => onDeleteItem(index)}
151+
className="min-w-5 hover:text-red-600 cursor-pointer hover-reveal-child"
152+
/>
153+
)}
154154
</div>
155155
);
156156
};

src/frontend/platform/src/pages/Dashboard/components/dashboard/DashboardDetail.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ export function DashboardDetail({
6767
const trimmedTitle = title.trim()
6868

6969
if (!trimmedTitle || !dashboard) {
70-
setTitle(dashboard?.title || "")
71-
return toast({
72-
description: t('nameRequired'),
73-
variant: "error",
74-
})
70+
return setTitle(dashboard?.title || "")
71+
// return toast({
72+
// description: t('nameRequired'),
73+
// variant: "error",
74+
// })
7575
}
7676

7777
if (trimmedTitle.length > 200) {

src/frontend/platform/src/pages/Dashboard/components/editor/ComponentWrapper.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { QueryFilter } from "../charts/QueryFilter"
1111
import "./index.css"
1212
import { cn } from "@/utils"
1313
import { useTranslation } from "react-i18next"
14+
import Tip from "@/components/bs-ui/tooltip/tip"
1415

1516
interface ComponentWrapperProps {
1617
component: DashboardComponent
@@ -62,10 +63,10 @@ export function ComponentWrapper({
6263

6364
if (!trimmedTitle) {
6465
setTitle(component.title)
65-
toast({
66-
description: t('nameRequired'),
67-
variant: "error",
68-
})
66+
// toast({
67+
// description: t('nameRequired'),
68+
// variant: "error",
69+
// })
6970
return
7071
}
7172

@@ -180,7 +181,9 @@ export function ComponentWrapper({
180181
onCopyTo(componentData, dashboard.id)
181182
}}
182183
>
183-
{dashboard.title}
184+
<Tip content={dashboard.title} styleClasses="max-w-60 max-h-60 overflow-auto bg-black no-scrollbar">
185+
<div className="max-w-60 truncate">{dashboard.title}</div>
186+
</Tip>
184187
</DropdownMenuItem>
185188
))
186189
)}

src/frontend/platform/src/routes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const privateRouter = [
9696
{ path: "dashboard", element: <Dashboard /> },
9797
],
9898
},
99-
{ path: "dashboard/:id", element: <EditorPage />, errorElement: <RouteErrorBoundary />, permission: 'dashboard', },
99+
{ path: "dashboard/:id", element: <EditorPage />, errorElement: <RouteErrorBoundary />, permission: 'board', },
100100
{ path: "dashboard/share/:boardId", element: <SharePage />, errorElement: <RouteErrorBoundary /> },
101101
{ path: "model/doc", element: <Doc />, errorElement: <RouteErrorBoundary /> },
102102
{

0 commit comments

Comments
 (0)