Skip to content

Commit

Permalink
fix(front): fix progress display
Browse files Browse the repository at this point in the history
  • Loading branch information
SARDONYX-sard committed Nov 9, 2024
1 parent fa1d9d5 commit 6c91805
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions gui/frontend/src/components/atoms/ConvertButton/ConvertButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function ConvertButton({ loading, progress, ...props }: Props) {
return (
<LoadingButton
disabled={loading || isComplete}
endIcon={loading || isComplete ? undefined : <ConvertIcon />}
endIcon={loading || isComplete ? <CircularProgressWithLabel value={progress} /> : <ConvertIcon />}
loading={loading}
loadingPosition='end'
sx={{
Expand Down Expand Up @@ -74,21 +74,7 @@ export function ConvertButton({ loading, progress, ...props }: Props) {
variant='contained'
{...props}
>
<span>
{loading ? (
<>
{t('converting-btn')}
<CircularProgressWithLabel value={progress} />
</>
) : isComplete ? (
<>
OK
<CircularProgressWithLabel value={progress} />
</>
) : (
t('convert-btn')
)}
</span>
<span>{loading ? `${t('converting-btn')} ${progress}%` : isComplete ? 'OK' : t('convert-btn')}</span>
</LoadingButton>
);
}

0 comments on commit 6c91805

Please sign in to comment.