From 989208eb4547e207a352d2267d6a31c432eb84ff Mon Sep 17 00:00:00 2001 From: boojack Date: Thu, 9 Feb 2023 23:24:51 +0800 Subject: [PATCH] chore: update resource select dialog (#999) * chore: update resource select dialog * chore: update --- .../components/ResourcesSelectorDialog.tsx | 26 +++++-------------- web/src/less/resources-selector-dialog.less | 8 +++--- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/web/src/components/ResourcesSelectorDialog.tsx b/web/src/components/ResourcesSelectorDialog.tsx index aecc6ebd..f9c6f377 100644 --- a/web/src/components/ResourcesSelectorDialog.tsx +++ b/web/src/components/ResourcesSelectorDialog.tsx @@ -1,4 +1,4 @@ -import { Checkbox, Tooltip } from "@mui/joy"; +import { Button, Checkbox } from "@mui/joy"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import useLoading from "../hooks/useLoading"; @@ -92,8 +92,8 @@ const ResourcesSelectorDialog: React.FC = (props: Props) => { ) : (
- ID {t("resources.name")} + Type
{resources.length === 0 ? ( @@ -101,17 +101,11 @@ const ResourcesSelectorDialog: React.FC = (props: Props) => { ) : ( resources.map((resource, index) => (
- {resource.id} - - {resource.filename} - + handlePreviewBtnClick(resource)}> + {resource.filename} + + {resource.type}
- handlePreviewBtnClick(resource)} - > - {t("resources.preview")} - handleCheckboxChange(index)} />
@@ -124,13 +118,7 @@ const ResourcesSelectorDialog: React.FC = (props: Props) => { {t("message.count-selected-resources")}: {state.checkedArray.filter((checked) => checked).length}
-
- - {t("common.confirm")} -
+
diff --git a/web/src/less/resources-selector-dialog.less b/web/src/less/resources-selector-dialog.less index 2c31c91c..034e08ac 100644 --- a/web/src/less/resources-selector-dialog.less +++ b/web/src/less/resources-selector-dialog.less @@ -37,13 +37,13 @@ .field-text { @apply w-full truncate text-base pr-2 last:pr-0; - &.id-text { - @apply col-span-2; - } - &.name-text { @apply col-span-4; } + + &.type-text { + @apply col-span-2; + } } } }