Skip to content

Commit

Permalink
Fixed #59: dont display above 100%
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed May 7, 2024
1 parent 2d1a1db commit 54abc33
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontend/src/components/FileTableRowComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,13 @@ const showEditComponents = computed(
() => (props.inEditMode || inSingleFileEditMode.value) && props.clientVisibleFile.file.isEditable
)
const fileUploadingPercentage = computed(() =>
((props.clientVisibleFile.uploadedSize / props.clientVisibleFile.file.filesize) * 100).toFixed(0)
)
const fileUploadingPercentage = computed(() => {
let pc = (
(props.clientVisibleFile.uploadedSize / props.clientVisibleFile.file.filesize) *
100
).toFixed(0)
return pc > 100 ? 100 : pc
})
watch(
() => props.inEditMode,
Expand Down

0 comments on commit 54abc33

Please sign in to comment.