Commit 0b7c2033 authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

better import visualisation

parent f15829ae
......@@ -88,17 +88,24 @@
<b-button variant="success" v-b-modal.modal-add-file>Upload or add a file</b-button>
</div>
<b-table ref="filesTable" striped :fields="filesTableFields" :items="files">
<template slot="metadata.artist" slot-scope="data">
<template slot="metadata.album" slot-scope="data">
<span v-if="data.item.source.import.state !== 'done'"><img src="../assets/radio.gif" width="24" alt="loading data" /></span>
<span v-else>{{ data.value }}</span>
</template>
<template slot="metadata.album" slot-scope="data">
<template slot="metadata.title" slot-scope="data">
<span v-if="data.item.source.import.state === 'done'">{{ data.value }}</span>
<span v-else-if="data.item.source.import.progress !== undefined">{{ data.item.source.import.progress.step }} :</span>
</template>
<template slot="duration" slot-scope="data">
<div v-if="data.item.source.import.state === 'done'">{{ prettyNanoseconds(data.value) }}</div>
<div v-else-if="data.item.source.import.progress !== undefined"><b-progress :value="data.item.source.import.progress.progress" :max="1" show-progress animated></b-progress></div>
<div v-else-if="data.item.source.import.progress !== undefined">
<div v-if="data.item.source.import.progress.step === 'fetching'">
<b-progress :value="data.item.source.import.progress.progress" :max="1" show-progress variant="info" animated></b-progress>
</div>
<div v-else>
<b-progress :value="data.item.source.import.progress.progress" :max="1" show-progress variant="success" animated></b-progress>
</div>
</div>
</template>
<template slot="size" slot-scope="data">
<span v-if="data.item.source.import.state === 'done'">{{ prettyFileSize(data.value) }}</span>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment