Skip to content

Commit 0c7ecbd

Browse files
authored
Merge pull request #7060 from Lokimorty/hub-new-chat-button
fix: improve Hub download button UX for installed models
2 parents 2989070 + e9cf3d8 commit 0c7ecbd

File tree

15 files changed

+33
-24
lines changed

15 files changed

+33
-24
lines changed

web-app/src/containers/DownloadButton.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,15 @@ export function DownloadButtonPlaceholder({
137137
)}
138138
{isDownloaded ? (
139139
<Button
140+
variant="link"
140141
size="sm"
142+
className="p-0"
141143
onClick={() => handleUseModel(modelId)}
142144
data-test-id={`hub-model-${modelId}`}
143145
>
144-
{t('hub:use')}
146+
<div className="rounded-sm hover:bg-main-view-fg/15 bg-main-view-fg/10 transition-all duration-200 ease-in-out px-2 py-1">
147+
{t('hub:newChat')}
148+
</div>
145149
</Button>
146150
) : (
147151
<Button

web-app/src/containers/ModelDownloadAction.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,17 @@ export const ModelDownloadAction = ({
7979

8080
if (isDownloaded) {
8181
return (
82-
<div
83-
className="flex items-center justify-center rounded bg-main-view-fg/10"
82+
<Button
83+
variant="link"
84+
size="sm"
85+
className="p-0"
86+
onClick={() => handleUseModel(variant.model_id)}
8487
title={t('hub:useModel')}
8588
>
86-
<Button
87-
variant="link"
88-
size="sm"
89-
onClick={() => handleUseModel(variant.model_id)}
90-
>
91-
{t('hub:use')}
92-
</Button>
93-
</div>
89+
<div className="rounded-sm hover:bg-main-view-fg/15 bg-main-view-fg/10 transition-all duration-200 ease-in-out px-2 py-1">
90+
{t('hub:newChat')}
91+
</div>
92+
</Button>
9493
)
9594
}
9695

web-app/src/locales/cs/hub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sortNewest": "Newest",
33
"sortMostDownloaded": "Most downloaded",
4-
"use": "Use",
4+
"newChat": "Nový chat",
55
"download": "Download",
66
"downloaded": "Downloaded",
77
"loadingModels": "Loading models...",

web-app/src/locales/de-DE/hub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sortNewest": "Neueste",
33
"sortMostDownloaded": "Meist heruntergeladen",
4-
"use": "Nutzen",
4+
"newChat": "Neuer Chat",
55
"download": "Herunterladen",
66
"downloaded": "Heruntergeladen",
77
"loadingModels": "Lade Modelle...",

web-app/src/locales/en/hub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sortNewest": "Newest",
33
"sortMostDownloaded": "Most downloaded",
4-
"use": "Use",
4+
"newChat": "New chat",
55
"download": "Download",
66
"downloaded": "Downloaded",
77
"loadingModels": "Loading models...",

web-app/src/locales/fr/hub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sortNewest": "Le plus récent",
33
"sortMostDownloaded": "Le plus téléchargé",
4-
"use": "Utiliser",
4+
"newChat": "Nouvelle conversation",
55
"download": "Télécharger",
66
"downloaded": "Téléchargé",
77
"loadingModels": "Chargement des modèles...",

web-app/src/locales/id/hub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sortNewest": "Terbaru",
33
"sortMostDownloaded": "Paling Banyak Diunduh",
4-
"use": "Gunakan",
4+
"newChat": "Chat baru",
55
"download": "Unduh",
66
"downloaded": "Telah Diunduh",
77
"loadingModels": "Memuat model...",

web-app/src/locales/ja/hub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sortNewest": "新着順",
33
"sortMostDownloaded": "ダウンロード数順",
4-
"use": "使用",
4+
"newChat": "新しいチャット",
55
"download": "ダウンロード",
66
"downloaded": "ダウンロード済み",
77
"loadingModels": "モデルを読み込み中...",

web-app/src/locales/pl/hub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sortNewest": "Najnowsze",
33
"sortMostDownloaded": "Najczęściej pobierane",
4-
"use": "Użyj",
4+
"newChat": "Nowy czat",
55
"download": "Pobierz",
66
"downloaded": "Pobrany",
77
"loadingModels": "Wczytywanie modeli…",

web-app/src/locales/pt-BR/hub.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sortNewest": "Mais Recentes",
33
"sortMostDownloaded": "Mais Baixados",
4-
"use": "Usar",
4+
"newChat": "Nova conversa",
55
"download": "Baixar",
66
"downloaded": "Baixado",
77
"loadingModels": "Carregando modelos...",

0 commit comments

Comments
 (0)