Skip to content

Commit

Permalink
fixup! fix(upload): update NcProgressBar styles
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Jan 31, 2024
1 parent e2c9321 commit 7d82327
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@
:class="previewImageClass"
alt=""
:src="defaultIconUrl">
<NcProgressBar v-if="isTemporaryUpload && !isUploadEditor"
<NcProgressBar v-if="showUploadProgress"
class="file-preview__progress"
size="medium"
type="circular"
:size="56"
:value="uploadProgress" />
</span>
<span v-else-if="isLoading"
Expand Down Expand Up @@ -541,6 +542,11 @@ export default {
}
},

showUploadProgress() {
return this.isTemporaryUpload && !this.isUploadEditor
&& ['shared', 'sharing', 'successUpload', 'uploading'].includes(this.uploadFile?.status)
},

hasTemporaryImageUrl() {
return this.mimetype.startsWith('image/') && this.localUrl
},
Expand Down Expand Up @@ -653,9 +659,9 @@ export default {

&__progress {
position: absolute;
bottom: 10px;
left: 4px;
width: calc(100% - 8px);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.loading {
Expand Down

0 comments on commit 7d82327

Please sign in to comment.