Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
refactor: replace toggle with chevron for show variants in Hub
Arthur Sepiola6ef488f05d1
diff --git a/web-app/src/routes/hub/index.tsx b/web-app/src/routes/hub/index.tsxindex 14342ea30..834bb549b 100644--- a/web-app/src/routes/hub/index.tsx+++ b/web-app/src/routes/hub/index.tsx@@ -17,6 +17,8 @@ import { useModelProvider } from '@/hooks/useModelProvider'import { Card, CardItem } from '@/containers/Card'import { extractModelName, extractDescription } from '@/lib/models'import {+ IconChevronDown,+ IconChevronUp,IconDownload,IconFileCode,IconEye,@@ -682,29 +684,36 @@ function HubContent() {</div>)}</div>- {(filteredModels[virtualItem.index].quants?.length ?? 0) >- 1 && (- <div className="flex items-center gap-2 hub-show-variants-step">- <Switch- checked={- !!expandedModels[- filteredModels[virtualItem.index]- .model_name- ]- }- onCheckedChange={() =>- toggleModelExpansion(- filteredModels[virtualItem.index]- .model_name- )- }- />- <p className="text-muted-foreground">- {t('hub:showVariants')}- </p>- </div>- )}</div>+ {(filteredModels[virtualItem.index].quants?.length ?? 0) >+ 1 && (+ <button+ className="flex items-center gap-1 hub-show-variants-step ml-auto"+ onClick={() =>+ toggleModelExpansion(+ filteredModels[virtualItem.index]+ .model_name+ )+ }+ >+ <span className="text-foreground">+ {t('hub:showVariants')}+ </span>+ {expandedModels[+ filteredModels[virtualItem.index].model_name+ ] ? (+ <IconChevronUp+ size={18}+ className="text-muted-foreground"+ />+ ) : (+ <IconChevronDown+ size={18}+ className="text-muted-foreground"+ />+ )}+ </button>+ )}</div>{expandedModels[filteredModels[virtualItem.index].model_name