From 51f8c96a5752a80dc8bfc05c64fae0f6b0283009 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Tue, 25 Feb 2025 14:37:15 +0700 Subject: [PATCH] chore: update hub UI (#4734) * chore: update hub ui based feedback * chore: update hub ui * chore: code block ui * chore: update bg color * chore: decrease margin codeblock --- web/containers/ModelDownloadButton/index.tsx | 8 +++++-- .../Hub/ModelList/ModelHeader/index.tsx | 23 +++++++++++++++++-- web/screens/Hub/ModelPage/index.tsx | 12 +++++++++- web/screens/Hub/index.tsx | 4 ++-- .../TextMessage/MarkdownTextMessage.tsx | 1 - web/styles/components/code-block.scss | 1 - web/styles/components/marked.scss | 2 ++ web/styles/components/message.scss | 6 +++++ 8 files changed, 48 insertions(+), 9 deletions(-) diff --git a/web/containers/ModelDownloadButton/index.tsx b/web/containers/ModelDownloadButton/index.tsx index 946c2b2f8..9555582fa 100644 --- a/web/containers/ModelDownloadButton/index.tsx +++ b/web/containers/ModelDownloadButton/index.tsx @@ -3,6 +3,8 @@ import { useCallback, useMemo } from 'react' import { Button, Tooltip } from '@janhq/joi' import { useAtomValue, useSetAtom } from 'jotai' +import { twMerge } from 'tailwind-merge' + import { MainViewState } from '@/constants/screens' import { useCreateNewThread } from '@/hooks/useCreateNewThread' @@ -22,8 +24,9 @@ interface Props { id: string theme?: 'primary' | 'ghost' | 'icon' | 'destructive' | undefined variant?: 'solid' | 'soft' | 'outline' | undefined + className?: string } -const ModelDownloadButton = ({ id, theme, variant }: Props) => { +const ModelDownloadButton = ({ id, theme, variant, className }: Props) => { const { downloadModel } = useDownloadModel() const downloadingModels = useAtomValue(getDownloadingModelAtom) const downloadedModels = useAtomValue(downloadedModelsAtom) @@ -59,7 +62,8 @@ const ModelDownloadButton = ({ id, theme, variant }: Props) => { const defaultButton = (