Add lightbox retries and queue removal
This commit is contained in:
@@ -18,7 +18,7 @@ export default function UploadQueueScreen() {
|
||||
const { t } = useTranslation();
|
||||
const { locale } = useLocale();
|
||||
const { token } = useEventData();
|
||||
const { items, loading, retryAll, clearFinished, refresh } = useUploadQueue();
|
||||
const { items, loading, retryAll, clearFinished, refresh, remove } = useUploadQueue();
|
||||
const [progress, setProgress] = React.useState<ProgressMap>({});
|
||||
const { isDark } = useGuestThemeVariant();
|
||||
const mutedText = isDark ? 'rgba(248, 250, 252, 0.7)' : 'rgba(15, 23, 42, 0.65)';
|
||||
@@ -204,15 +204,35 @@ export default function UploadQueueScreen() {
|
||||
: ''}
|
||||
</Text>
|
||||
</YStack>
|
||||
<YStack minWidth={72} alignItems="flex-end">
|
||||
<Text fontSize="$2" color={mutedText}>
|
||||
{pct !== undefined
|
||||
? t('uploadQueue.progress', { progress: pct }, '{progress}%')
|
||||
: item.status === 'done'
|
||||
? t('uploadQueue.progress', { progress: 100 }, '{progress}%')
|
||||
: ''}
|
||||
</Text>
|
||||
</YStack>
|
||||
<XStack alignItems="center" gap="$2">
|
||||
<YStack minWidth={72} alignItems="flex-end">
|
||||
<Text fontSize="$2" color={mutedText}>
|
||||
{pct !== undefined
|
||||
? t('uploadQueue.progress', { progress: pct }, '{progress}%')
|
||||
: item.status === 'done'
|
||||
? t('uploadQueue.progress', { progress: 100 }, '{progress}%')
|
||||
: ''}
|
||||
</Text>
|
||||
</YStack>
|
||||
{item.status === 'error' && typeof item.id === 'number' ? (
|
||||
<Button
|
||||
size="$2"
|
||||
borderRadius="$pill"
|
||||
backgroundColor={isDark ? 'rgba(255, 255, 255, 0.08)' : 'rgba(15, 23, 42, 0.06)'}
|
||||
borderWidth={1}
|
||||
borderColor={isDark ? 'rgba(255, 255, 255, 0.2)' : 'rgba(15, 23, 42, 0.12)'}
|
||||
onPress={() => remove(item.id!)}
|
||||
aria-label={t('uploadQueue.actions.removeFailed', 'Remove failed upload')}
|
||||
>
|
||||
<XStack alignItems="center" justifyContent="center" gap="$2">
|
||||
<Trash2 size={14} color={isDark ? '#F8FAFF' : '#0F172A'} />
|
||||
<Text fontSize="$2" fontWeight="$6">
|
||||
{t('uploadQueue.actions.removeFailed', 'Remove')}
|
||||
</Text>
|
||||
</XStack>
|
||||
</Button>
|
||||
) : null}
|
||||
</XStack>
|
||||
</XStack>
|
||||
<YStack
|
||||
height={6}
|
||||
|
||||
Reference in New Issue
Block a user