Skip to content

Commit

Permalink
Add ProgressBar component
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Ambrosini <marcoambrosini@pm.me>
  • Loading branch information
marcoambrosini committed Jul 15, 2020
1 parent 9ec4cfe commit 3d02ce8
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,49 +37,62 @@
<span v-if="isLoading"
class="preview loading" />
<strong>{{ name }}</strong>
<v-progress-linear v-if="isTemporaryUpload" color="#033" :value="uploadProgress" />
<ProgressBar v-if="isTemporaryUpload" :value="uploadProgress" />
</a>
</template>

<script>
import { generateUrl, imagePath } from '@nextcloud/router'
import ProgressBar from '@nextcloud/vue/dist/Components/ProgressBar'
export default {
name: 'FilePreview',
components: {
ProgressBar,
},
props: {
type: {
type: String,
required: true,
},
id: {
type: String,
required: true,
},
name: {
type: String,
required: true,
},
path: {
type: String,
default: '',
},
link: {
type: String,
default: '',
},
mimetype: {
type: String,
default: '',
},
previewAvailable: {
type: String,
default: 'no',
},
previewSize: {
type: Number,
default: 128,
},
// In case this component is used to display a file that is being uploaded
// this parameter is used to access the file upload status in the store
uploadId: {
Expand Down Expand Up @@ -205,6 +218,7 @@ export default {
<style lang="scss" scoped>
.container {
width: 100%;
/* The file preview can not be a block; otherwise it would fill the whole
width of the container and the loading icon would not be centered on the
image. */
Expand Down

0 comments on commit 3d02ce8

Please sign in to comment.