Skip to content

Commit

Permalink
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 Feb 12, 2024
1 parent 415a073 commit 467dc40
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
:class="previewImageClass"
alt=""
:src="defaultIconUrl">
<NcProgressBar v-if="showUploadProgress"
class="file-preview__progress"
type="circular"
:value="uploadProgress" />
</span>
<span v-else-if="isLoading"
v-tooltip="previewTooltip"
Expand All @@ -65,7 +69,6 @@
<Close />
</template>
</NcButton>
<NcProgressBar v-if="isTemporaryUpload && !isUploadEditor" :value="uploadProgress" />
<div v-if="shouldShowFileDetail" class="name-container">
{{ fileDetail }}
</div>
Expand Down Expand Up @@ -538,6 +541,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 @@ -628,6 +636,7 @@ export default {
border-radius: 16px;

box-sizing: content-box !important;

&:hover,
&:focus,
&:focus-visible {
Expand All @@ -648,6 +657,13 @@ export default {
transition: outline 0.1s ease-in-out;
}

&__progress {
position: absolute;
top: 50%;
right: 0;
transform: translate(100%, -50%);
}

.loading {
display: inline-block;
min-width: 32px;
Expand Down

0 comments on commit 467dc40

Please sign in to comment.