Skip to content

Commit e2d4fdf

Browse files
committed
fix: fix bug
1 parent d724059 commit e2d4fdf

6 files changed

Lines changed: 32 additions & 56 deletions

File tree

src/frontend/platform/public/locales/zh-Hans/dashboard.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"setDefault": "设置为默认值",
2222
"datePicker": {
23-
"placeholder": "选择{{displayType}}",
23+
"placeholder": "选择时间",
2424
"single": "时间",
2525
"range": "时间范围"
2626
},

src/frontend/platform/src/pages/Dashboard/components/config/ChartSelector.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { Checkbox } from "@/components/bs-ui/checkBox"
1313
import { useComponentEditorStore, useEditorDashboardStore } from "@/store/dashboardStore"
1414
import { AdvancedDatePicker } from "../AdvancedDatePicker"
15-
import { ChevronRight, ChevronLeft } from "lucide-react"
15+
import { ListIndentIncrease, ListIndentDecrease } from "lucide-react"
1616
import { toast } from "@/components/bs-ui/toast/use-toast"
1717
import { useTranslation } from "react-i18next"
1818

@@ -244,7 +244,7 @@ export default function ChartSelector({
244244
{t("chartSelector.messages.collapse")}
245245
</div>
246246
<div className="mt-2">
247-
<ChevronRight className="h-4 w-4" />
247+
<ListIndentDecrease className="h-4 w-4" />
248248
</div>
249249
</div>
250250
</div>
@@ -261,7 +261,8 @@ export default function ChartSelector({
261261
</h3>
262262
</div>
263263
<Button variant="ghost" size="icon" className="h-8 w-8" onClick={() => setCollapsed(true)}>
264-
<ChevronLeft className="h-4 w-4" />
264+
<ListIndentIncrease className="h-4 w-4" />
265+
265266
</Button>
266267
</div>
267268

src/frontend/platform/src/pages/Dashboard/components/config/ComponentConfigDrawer.tsx

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import { Button } from "@/components/bs-ui/button"
55
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/bs-ui/dialog"
66
import { Input } from "@/components/bs-ui/input"
7-
import { ChevronDown, ChevronLeft, ChevronRight, GripVertical, X } from "lucide-react"
7+
import { ChevronDown, GripVertical, ListIndentDecrease, ListIndentIncrease, X } from "lucide-react"
8+
89
import { useCallback, useMemo, useState } from "react"
910

1011
import { Label } from "@/components/bs-ui/label"
@@ -530,14 +531,14 @@ export function ComponentConfigDrawer() {
530531
<CollapseLabel
531532
label={t("componentConfigDrawer.basicConfig")}
532533
onClick={() => toggleCollapse('basic')}
533-
icon={<ChevronRight />}
534+
icon={<ListIndentDecrease className="w-4 h-4" />}
534535
/>
535536
) : (
536537
<div className="flex-1 flex flex-col overflow-hidden">
537538
<PanelHeader
538539
title={t("componentConfigDrawer.basicConfig")}
539540
onCollapse={() => toggleCollapse('basic')}
540-
icon={<ChevronLeft />}
541+
icon={<ListIndentIncrease className="w-4 h-4" />}
541542
/>
542543

543544
<div className="flex-1 overflow-y-auto pl-4 pr-4 pb-6 pt-4 space-y-6">
@@ -562,13 +563,21 @@ export function ComponentConfigDrawer() {
562563
<div className="relative w-full group">
563564
<div className="flex h-[28px] w-full items-center justify-between rounded-md border border-gray-300 bg-white px-3 py-2 text-sm transition-colors hover:border-gray-400 cursor-pointer">
564565
{/* 文本区域 */}
565-
<div className="flex-1">
566+
<div className="flex items-center gap-2 flex-1 min-w-0">
567+
<img
568+
src={`${__APP_ENV__.BASE_URL}/assets/dashboard/${chartType}.png`}
569+
className="w-4 h-4 shrink-0"
570+
alt={chartType}
571+
/>
566572
<span className="truncate text-gray-700">
567-
{t(`chart.${ChartGroupItems
568-
.flatMap(item => item.data)
569-
.find(item => item.type === chartType)?.label}`) || t("componentConfigDrawer.selectChartType")}
573+
{t(
574+
`chart.${ChartGroupItems
575+
.flatMap(item => item.data)
576+
.find(item => item.type === chartType)?.label}`
577+
) || t("componentConfigDrawer.selectChartType")}
570578
</span>
571579
</div>
580+
572581
{/* ChevronDown */}
573582
<ChevronDown className="h-4 w-4 text-gray-500 flex-shrink-0" />
574583
</div>
@@ -792,14 +801,14 @@ export function ComponentConfigDrawer() {
792801
<CollapseLabel
793802
label={t("componentConfigDrawer.dataSelection")}
794803
onClick={() => toggleCollapse('data')}
795-
icon={<ChevronLeft />}
804+
icon={<ListIndentDecrease className="w-4 h-4" />}
796805
/>
797806
) : (
798807
<div className="flex-1 flex flex-col overflow-hidden">
799808
<PanelHeader
800809
title={t("componentConfigDrawer.dataSelection")}
801810
onCollapse={() => toggleCollapse('data')}
802-
icon={<ChevronRight />}
811+
icon={<ListIndentIncrease className="w-4 h-4" />}
803812
/>
804813
<div className="flex-1 overflow-auto">
805814
<DatasetSelector

src/frontend/platform/src/pages/Dashboard/components/config/DashboardConfigPanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"use client"
33

44
import { Button } from "@/components/bs-ui/button"
5-
import { ChevronLeft, ChevronRight } from "lucide-react"
5+
import { ListIndentDecrease, ListIndentIncrease } from "lucide-react"
66
import { useEffect, useState } from "react"
77
import { useEditorDashboardStore } from "@/store/dashboardStore"
88
import { useTranslation } from "react-i18next"
@@ -66,14 +66,14 @@ export function DashboardConfigPanel({ collapsed = false, onCollapse }: Dashboar
6666
<CollapseLabel
6767
label={t("configPanel.title")}
6868
onClick={onCollapse}
69-
icon={<ChevronRight />}
69+
icon={<ListIndentDecrease className="w-4 h-4" />}
7070
/>
7171
) : (
7272
<div className="flex-1 flex flex-col overflow-hidden">
7373
<PanelHeader
7474
title={t("configPanel.title")}
7575
onCollapse={onCollapse}
76-
icon={<ChevronLeft />}
76+
icon={<ListIndentIncrease className="w-4 h-4" />}
7777
/>
7878

7979
<div className="flex-1 overflow-y-auto px-2 pb-6 pt-4 space-y-6">

src/frontend/platform/src/pages/Dashboard/components/config/DatasetSelector.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Input } from "@/components/bs-ui/input"
44
import { Label } from "@/components/bs-ui/label"
55
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/bs-ui/select"
66
import { getDatasets, MetricConfig } from "@/controllers/API/dashboard"
7-
import { Calendar, ChevronDown, ChevronRight, Clock3, Hash, Search, Type } from "lucide-react"
7+
import { Calendar, ChevronDown, ChevronRight, ChevronUp, Clock3, Hash, Search, Type } from "lucide-react"
88
import { useEffect, useMemo, useState } from "react"
99
import { useQuery } from "react-query"
1010
import { useTranslation } from "react-i18next"
@@ -195,7 +195,7 @@ export function DatasetSelector({ selectedDatasetCode, onDatasetChange, onDragSt
195195
{dimensionsExpanded ? (
196196
<ChevronDown className="h-4 w-4" />
197197
) : (
198-
<ChevronRight className="h-4 w-4" />
198+
<ChevronUp className="h-4 w-4" />
199199
)}
200200
</button>
201201

@@ -265,7 +265,7 @@ export function DatasetSelector({ selectedDatasetCode, onDatasetChange, onDragSt
265265
{metricsExpanded ? (
266266
<ChevronDown className="h-4 w-4" />
267267
) : (
268-
<ChevronRight className="h-4 w-4" />
268+
<ChevronUp className="h-4 w-4" />
269269
)}
270270
</button>
271271
{metricsExpanded && (

src/frontend/platform/src/pages/SystemPage/components/EditRole.tsx

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ const SearchPanne = ({
101101
page_num: page,
102102
page_size: pageSize
103103
};
104+
console.log(type, 7877);
104105

105106
switch (type) {
106107
case 'flow':
@@ -111,8 +112,8 @@ const SearchPanne = ({
111112
return getGroupResourcesApi({ ...param, resource_type: 4 });
112113
case 'assistant':
113114
return getGroupResourcesApi({ ...param, resource_type: 3 });
114-
// case 'board':
115-
// return getGroupResourcesApi({ ...param, resource_type: 6 });
115+
case 'board':
116+
return getGroupResourcesApi({ ...param, resource_type: 6 });
116117
default:
117118
return getGroupResourcesApi({ ...param, resource_type: 1 });
118119
}
@@ -160,7 +161,6 @@ const SearchPanne = ({
160161

161162
return <>
162163
<div className="mt-6 flex flex-col items-start relative gap-3">
163-
{/* <p className="text-xl font-bold">{title}</p> */}
164164
{type === 'board' && (
165165
<div className="flex flex-col gap-4 w-full">
166166
{/* 允许创建看板开关 */}
@@ -177,40 +177,6 @@ const SearchPanne = ({
177177
</p>
178178
</div>
179179
</div>
180-
181-
{/* 看板使用/管理权限表格 */}
182-
<Table className="mt-2">
183-
<TableHeader>
184-
<TableRow>
185-
<TableHead>{t(nameKey)}</TableHead>
186-
<TableHead className="text-center w-[175px]">{t('system.usePermission')}</TableHead>
187-
<TableHead className="text-center w-[175px]">{t('system.managePermission')}</TableHead>
188-
</TableRow>
189-
</TableHeader>
190-
<TableBody>
191-
{data.map((el: any) => {
192-
const id = Number(el.id);
193-
return (
194-
<TableRow key={id}>
195-
<TableCell className="font-medium">{t(el.name)}</TableCell>
196-
<TableCell className="text-center">
197-
<Switch
198-
checked={useChecked(id)}
199-
onCheckedChange={(bln) => onUseChange(id, bln)}
200-
/>
201-
</TableCell>
202-
<TableCell className="text-center">
203-
<Switch
204-
disabled={!appConfig.isPro}
205-
checked={manageChecked(id)}
206-
onCheckedChange={(bln) => onManageChange(id, bln)}
207-
/>
208-
</TableCell>
209-
</TableRow>
210-
);
211-
})}
212-
</TableBody>
213-
</Table>
214180
</div>
215181
)}
216182

0 commit comments

Comments
 (0)