From e911a4e719d3fc632c229c026d479ce8a834bd2b Mon Sep 17 00:00:00 2001 From: twwu Date: Tue, 8 Jul 2025 15:28:22 +0800 Subject: [PATCH] fix: Update button styles and improve file size validation in breadcrumb and item components --- .../file-list/header/breadcrumbs/bucket.tsx | 7 ++++--- .../file-list/header/breadcrumbs/index.tsx | 4 ++-- .../online-drive/file-list/header/breadcrumbs/item.tsx | 5 +++-- .../data-source/online-drive/file-list/list/item.tsx | 2 +- .../datasets/list/new-dataset-card/index.tsx | 10 +++++----- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/bucket.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/bucket.tsx index d18087c075..a9d2e769ad 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/bucket.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/bucket.tsx @@ -34,7 +34,7 @@ const Bucket = ({ > - {showSeparator && /} + {showSeparator && /} ) } diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/index.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/index.tsx index 81cbeb08e1..a77ee0ee7a 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/index.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/header/breadcrumbs/index.tsx @@ -66,7 +66,7 @@ const Breadcrumbs = ({ }, [dataSourceStore, prefix]) return ( -
+
{showSearchResult && (
{t('datasetPipeline.onlineDrive.breadcrumbs.searchResult', { @@ -81,7 +81,7 @@ const Breadcrumbs = ({
)} {!showSearchResult && !isRoot && ( -
+
{bucket && ( {name} - {showSeparator && /} + {showSeparator && /} ) } diff --git a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/item.tsx b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/item.tsx index 247f8c21c7..0f81c680e8 100644 --- a/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/item.tsx +++ b/web/app/components/datasets/documents/create-from-pipeline/data-source/online-drive/file-list/list/item.tsx @@ -85,7 +85,7 @@ const Item = ({ > {file.displayName} - {!isFolder && file.size && ( + {!isFolder && typeof file.size === 'number' && ( {formatFileSize(file.size)} )}
diff --git a/web/app/components/datasets/list/new-dataset-card/index.tsx b/web/app/components/datasets/list/new-dataset-card/index.tsx index b268f25a3d..cc84c9a334 100644 --- a/web/app/components/datasets/list/new-dataset-card/index.tsx +++ b/web/app/components/datasets/list/new-dataset-card/index.tsx @@ -14,16 +14,16 @@ const CreateAppCard = () => { return (
-