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

indicate import state in table; correct typo

parent 03923313
......@@ -88,11 +88,22 @@
<b-button variant="success" v-b-modal.modal-add-file>Upload or add a file</b-button>
</div>
<b-table striped :fields="filesTableFields" :items="files">
<template slot="metadata.artist" 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">
<span v-if="data.item.source.import.state === 'new'" class="stateNew">upload not started</span>
<span v-else-if="data.item.source.import.state === 'running'" class="stateRunning">importing</span>
<span v-else-if="data.item.source.import.state === 'done'">{{ data.value }}</span>
<span v-else class="stateUndefined">undefined import state</span>
</template>
<template slot="duration" slot-scope="data">
{{ prettyNanoseconds(data.value) }}
<span v-if="data.item.source.import.state !== 'done'"><img src="../assets/radio.gif" width="24" alt="loading data" /></span>
<span v-else>{{ prettyNanoseconds(data.value) }}</span>
</template>
<template slot="size" slot-scope="data">
{{ prettyFileSize(data.value) }}
<span v-if="data.item.source.import.state === 'done'">{{ prettyFileSize(data.value) }}</span>
</template>
<template slot="actions" slot-scope="data">
<b-button-group size="sm">
......@@ -215,7 +226,7 @@ export default {
// if a metadata property was in use before and now shall be emptied
// we cannot just omit the property, but have to explicitly send null
var metadata = {
title: this.temp.artist ? this.temp.artist : null,
artist: this.temp.artist ? this.temp.artist : null,
album: this.temp.album ? this.temp.album : null,
title: this.temp.title ? this.temp.title : null
}
......@@ -409,4 +420,15 @@ div.filelistbox {
border-radius: 0.3rem;
padding: 1rem 2rem;
}
.stateNew {
color: red;
font-weight: bold;
}
.stateRunning {
color: darkgreen;
}
.stateUndefined {
color: orange;
font-weight: bold;
}
</style>
Markdown is supported
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