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