From 7e928c52cf4c52a0102fd2ce4b0a6fe2f4d8c92b Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Wed, 28 Aug 2024 13:57:50 +0700 Subject: [PATCH] fix: responsive modal import model gguf --- .../ModelDownloadList/index.tsx | 2 +- .../ModelDownloadRow/index.tsx | 30 ++++++++++++------- .../ModelSegmentInfo/index.tsx | 2 +- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadList/index.tsx b/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadList/index.tsx index e6285565f7..e59ee3416d 100644 --- a/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadList/index.tsx +++ b/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadList/index.tsx @@ -29,7 +29,7 @@ const ModelDownloadList = () => { return (

Available Versions

- + {ggufModels.map((model, index) => { if (!model.downloadUrl) return null return ( diff --git a/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadRow/index.tsx b/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadRow/index.tsx index 98914c94ec..951a11d59e 100644 --- a/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadRow/index.tsx +++ b/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadRow/index.tsx @@ -10,6 +10,8 @@ import { Badge, Button, Progress } from '@janhq/joi' import { useAtomValue, useSetAtom } from 'jotai' +import { twMerge } from 'tailwind-merge' + import { MainViewState } from '@/constants/screens' import { useCreateNewThread } from '@/hooks/useCreateNewThread' @@ -114,16 +116,24 @@ const ModelDownloadRow: React.FC = ({ } return ( -
-
- {quantization && ( - - {quantization} - - )} -

- {fileName} -

+
+
+
+ {quantization && ( + + {quantization} + + )} +

+ {fileName} +

+
{toGibibytes(fileSize)} diff --git a/web/screens/Settings/HuggingFaceRepoDetailModal/ModelSegmentInfo/index.tsx b/web/screens/Settings/HuggingFaceRepoDetailModal/ModelSegmentInfo/index.tsx index ba17e9b57a..10f4515c82 100644 --- a/web/screens/Settings/HuggingFaceRepoDetailModal/ModelSegmentInfo/index.tsx +++ b/web/screens/Settings/HuggingFaceRepoDetailModal/ModelSegmentInfo/index.tsx @@ -33,7 +33,7 @@ const ModelSegmentInfo = () => { if (!importingHuggingFaceRepoData) return null return ( -
+

{modelName}