Skip to content

Commit

Permalink
Remove Progress from files list
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Ray committed May 15, 2024
1 parent 2abf62b commit aaeae86
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions apps/app/components/dialogs/FilesListDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const FilesListDialog = ({ torrent, toast }) => {
onOpenChange={setIsOpen}
>
<ScrollView>
<YGroup bordered size="$2">
<YGroup>
{torrent.files.map((file) => (
<FileRow
key={file.name}
Expand All @@ -90,36 +90,19 @@ const FileRow = ({ torrent, file, toast }) => {
const i18n = useI18n()

return (
<ListItem key={file.name} hoverTheme>
<ListItem key={file.name} hoverTheme transparent>
<YStack gap="$1" f={1}>
<Paragraph f={1} flexWrap="wrap">
{file.name}
</Paragraph>
{/* <Paragraph color="$gray11">{prettyBytes(file.length)}</Paragraph> */}
<XStack columnGap="$2">
<TorrentFieldFormatter
name="percentDone"
value={file.bytesCompleted / file.length}
value={Math.floor(file.bytesCompleted / file.length)}
/>
<Paragraph></Paragraph>
<TorrentFieldFormatter name="totalSize" value={file.length} />
</XStack>
<XStack mb="$2">
<Progress
value={Math.floor((file.bytesCompleted / file.length) * 100)}
theme="yellow"
borderColor={'$yellow7'}
bordered
size="$2"
w="100%"
>
<Progress.Indicator
animation="lazy"
backgroundColor={'$yellow9'}
w={'100%'}
/>
</Progress>
</XStack>
{file.bytesCompleted / file.length === 1 && (
<XStack gap="$4">
<Button
Expand Down

0 comments on commit aaeae86

Please sign in to comment.