@@ -60,29 +60,28 @@ const populateAttributes = (item: UploadQueueItem): UploadQueueItemWithAttribute
6060 return { ...item , route : parts [ 3 ] , segment : parseInt ( parts [ 4 ] , 10 ) , filename : parts [ 5 ] , isFirehose : false }
6161}
6262
63- const UploadQueueRow : VoidComponent < { cancel : ( ids : string [ ] ) => void ; item : UploadQueueItemWithAttributes } > = ( { cancel, item } ) => {
63+ const UploadQueueRow : VoidComponent < { cancel : ( ids : string [ ] ) => void ; item : UploadQueueItemWithAttributes } > = ( props ) => {
64+ const item = ( ) => props . item
65+ const cancel = ( ) => props . cancel ( [ item ( ) . id ] )
6466 return (
6567 < div class = "flex flex-col" >
6668 < div class = "flex items-center justify-between flex-wrap mb-1 gap-x-4 min-w-0" >
6769 < div class = "flex items-center min-w-0 flex-1" >
68- < Icon class = "text-on-surface-variant flex-shrink-0 mr-2" name = { item . isFirehose ? 'local_fire_department' : 'person' } />
70+ < Icon class = "text-on-surface-variant flex-shrink-0 mr-2" name = { item ( ) . isFirehose ? 'local_fire_department' : 'person' } />
6971 < div class = "flex min-w-0 gap-1" >
70- < span class = "text-body-sm font-mono truncate text-on-surface" > { [ item . route , item . segment , item . filename ] . join ( ' ' ) } </ span >
72+ < span class = "text-body-sm font-mono truncate text-on-surface" > { [ item ( ) . route , item ( ) . segment , item ( ) . filename ] . join ( ' ' ) } </ span >
7173 </ div >
7274 </ div >
7375 < div class = "flex items-center gap-0.5 flex-shrink-0 justify-end" >
74- < Show
75- when = { ! item . id || item . progress !== 0 }
76- fallback = { < IconButton size = "20" name = "close_small" onClick = { ( ) => cancel ( [ item . id ] ) } /> }
77- >
76+ < Show when = { ! item ( ) . id || item ( ) . progress !== 0 } fallback = { < IconButton size = "20" name = "close_small" onClick = { cancel } /> } >
7877 < span class = "text-body-sm font-mono whitespace-nowrap pr-[0.5rem]" >
79- { item . id ? `${ Math . round ( item . progress * 100 ) } %` : 'Offline' }
78+ { item ( ) . id ? `${ Math . round ( item ( ) . progress * 100 ) } %` : 'Offline' }
8079 </ span >
8180 </ Show >
8281 </ div >
8382 </ div >
8483 < div class = "h-1.5 w-full overflow-hidden rounded-full bg-surface-container-highest" >
85- < LinearProgress progress = { item . progress } color = { Math . round ( item . progress * 100 ) === 100 ? 'tertiary' : 'primary' } />
84+ < LinearProgress progress = { item ( ) . progress } color = { Math . round ( item ( ) . progress * 100 ) === 100 ? 'tertiary' : 'primary' } />
8685 </ div >
8786 </ div >
8887 )
0 commit comments