fix: some costmetic issues: badges corner, recommended for tensorrt models(#2346)

Signed-off-by: hiro <hiro@jan.ai>
Co-authored-by: hiro <hiro@jan.ai>
This commit is contained in:
NamH 2024-03-14 15:58:42 +07:00 committed by GitHub
parent 561b1dd94a
commit 03a0978f53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,5 @@
.badge {
@apply focus:ring-ring border-border inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;
@apply focus:ring-ring border-border inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;
&-primary {
@apply border-transparent bg-blue-100 text-blue-600;

View File

@ -294,7 +294,7 @@ const DropdownListSidebar = ({
<span className="font-bold text-muted-foreground">
{toGibibytes(x.metadata.size)}
</span>
{x.engine == InferenceEngine.nitro && (
{x.metadata.size && (
<ModelLabel size={x.metadata.size} />
)}
</div>

View File

@ -180,10 +180,11 @@ type EngineBadgeProps = {
const EngineBadge: React.FC<EngineBadgeProps> = ({ engine }) => {
switch (engine) {
case 'nitro-tensorrt-llm':
const title = 'TensorRT-LLM'
return (
<div className="flex items-center justify-center rounded-md bg-[#EFF6FF] px-2 py-[2px] font-semibold text-primary">
TensorRT-LLM
</div>
<Badge themes="primary" className="line-clamp-1" title={title}>
{title}
</Badge>
)
default:
return null