Change scrolling upload progress.
This commit is contained in:
@@ -65,7 +65,7 @@ export function UploadProgress({
|
||||
{ backgroundColor: theme.colors.elevation.level1 },
|
||||
]}
|
||||
>
|
||||
<ScrollView style={styles.modalFill}>
|
||||
<View style={styles.modalFill}>
|
||||
<Text variant="titleLarge" style={styles.title}>
|
||||
{t("general.labels.upload")}
|
||||
</Text>
|
||||
@@ -84,38 +84,40 @@ export function UploadProgress({
|
||||
</>
|
||||
)}
|
||||
<Divider style={{ marginVertical: 12 }} />
|
||||
{Object.keys(photoUploadProgress).map((key) => (
|
||||
<View key={key} style={styles.progressItem}>
|
||||
<Text
|
||||
style={styles.progressText}
|
||||
numberOfLines={1}
|
||||
ellipsizeMode="tail"
|
||||
>
|
||||
{photoUploadProgress[key].fileName}
|
||||
</Text>
|
||||
<View style={styles.progressBarContainer}>
|
||||
<ProgressBar
|
||||
progress={photoUploadProgress[key].progress || 0}
|
||||
style={styles.progress}
|
||||
color={
|
||||
photoUploadProgress[key].progress === 1 ? "green" : "blue"
|
||||
}
|
||||
/>
|
||||
<View style={styles.speedRow}>
|
||||
<Text>{`${formatBytes(
|
||||
photoUploadProgress[key].loaded /
|
||||
(((photoUploadProgress[key].endTime || new Date()) -
|
||||
photoUploadProgress[key].startTime) /
|
||||
1000)
|
||||
)}/sec`}</Text>
|
||||
<ScrollView style={styles.modalFill}>
|
||||
{Object.keys(photoUploadProgress).map((key) => (
|
||||
<View key={key} style={styles.progressItem}>
|
||||
<Text
|
||||
style={styles.progressText}
|
||||
numberOfLines={1}
|
||||
ellipsizeMode="tail"
|
||||
>
|
||||
{photoUploadProgress[key].fileName}
|
||||
</Text>
|
||||
<View style={styles.progressBarContainer}>
|
||||
<ProgressBar
|
||||
progress={photoUploadProgress[key].progress || 0}
|
||||
style={styles.progress}
|
||||
color={
|
||||
photoUploadProgress[key].progress === 1 ? "green" : "blue"
|
||||
}
|
||||
/>
|
||||
<View style={styles.speedRow}>
|
||||
<Text>{`${formatBytes(
|
||||
photoUploadProgress[key].loaded /
|
||||
(((photoUploadProgress[key].endTime || new Date()) -
|
||||
photoUploadProgress[key].startTime) /
|
||||
1000)
|
||||
)}/sec`}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
))}
|
||||
</ScrollView>
|
||||
<Button onPress={handleCancelUploads}>
|
||||
{t("general.actions.cancel")}
|
||||
</Button>
|
||||
</ScrollView>
|
||||
</View>
|
||||
</Modal>
|
||||
</Portal>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user