fix: badge or progress tensorRtExtensionItem (#2349)

This commit is contained in:
Faisal Amir 2024-03-14 18:37:54 +07:00 committed by GitHub
parent d9c3852997
commit 8120ad2a03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,6 +123,7 @@ const TensorRtExtensionItem: React.FC<Props> = ({ item }) => {
{item.description} {item.description}
</p> </p>
</div> </div>
{(!compatibility || compatibility['platform']?.includes(PLATFORM)) && {(!compatibility || compatibility['platform']?.includes(PLATFORM)) &&
isGpuSupported ? ( isGpuSupported ? (
<div className="flex min-w-[150px] flex-row justify-end"> <div className="flex min-w-[150px] flex-row justify-end">
@ -185,15 +186,14 @@ const InstallStateIndicator: React.FC<InstallStateProps> = ({
onInstallClick, onInstallClick,
onCancelClick, onCancelClick,
}) => { }) => {
// TODO: NamH support dark mode for this
if (installProgress !== -1) { if (installProgress !== -1) {
const progress = installProgress * 100 const progress = installProgress * 100
return ( return (
<div className="flex h-10 flex-row items-center justify-center space-x-2 rounded-md bg-[#EFF8FF] px-4 text-primary"> <div className="flex h-10 flex-row items-center justify-center space-x-2 rounded-lg bg-[#EFF8FF] px-4 text-primary dark:bg-secondary">
<button onClick={onCancelClick} className="font-semibold text-primary"> <button onClick={onCancelClick} className="font-semibold text-primary">
Cancel Cancel
</button> </button>
<div className="flex w-[113px] flex-row items-center justify-center space-x-2 rounded-md bg-[#D1E9FF] px-2 py-[2px]"> <div className="flex w-[113px] flex-row items-center justify-center space-x-2 rounded-md bg-[#D1E9FF] px-2 py-[2px] dark:bg-black/50">
<Progress className="h-1 w-[69px]" value={progress} /> <Progress className="h-1 w-[69px]" value={progress} />
<span className="text-xs font-bold text-primary"> <span className="text-xs font-bold text-primary">
{progress.toFixed(0)}% {progress.toFixed(0)}%