|
|
|
|
@ -23,7 +23,7 @@
|
|
|
|
|
|
|
|
|
|
<va-card-content>
|
|
|
|
|
<div class="va-table-responsive">
|
|
|
|
|
<table class="va-table va-table--striped">
|
|
|
|
|
<table class="va-table va-table--striped detail-table">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr
|
|
|
|
|
v-for="[key, value] of Object.entries(this.itemDetails).filter(([k, _v]) => !(this.hidden.includes(k)))">
|
|
|
|
|
@ -77,10 +77,10 @@ export default {
|
|
|
|
|
.then(() => this.detailsLoaded = true)
|
|
|
|
|
.catch((e) => console.log(e));
|
|
|
|
|
},
|
|
|
|
|
getPreviewPath(){
|
|
|
|
|
getPreviewPath() {
|
|
|
|
|
for (let extension of ["jpg", "png", "bmp"]) {
|
|
|
|
|
const path = `/static/previews/${this.itemDetails.fadr}+/${this.itemDetails.internal_id}.${extension}`
|
|
|
|
|
fetch(path, {method: 'HEAD'})
|
|
|
|
|
fetch(path, { method: 'HEAD' })
|
|
|
|
|
.then(resp => {
|
|
|
|
|
if (resp.status === 200) {
|
|
|
|
|
this.imageExtension = extension;
|
|
|
|
|
@ -88,7 +88,7 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch(e => {
|
|
|
|
|
// 404 are expected here, so ignore it
|
|
|
|
|
if (e.status !== 404){
|
|
|
|
|
if (e.status !== 404) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
@ -101,10 +101,10 @@ export default {
|
|
|
|
|
this.fetchItemDetails();
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
slotPreviewPath(){
|
|
|
|
|
slotPreviewPath() {
|
|
|
|
|
return this.getPreviewPath()
|
|
|
|
|
},
|
|
|
|
|
internalID(){
|
|
|
|
|
internalID() {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -138,4 +138,8 @@ export default {
|
|
|
|
|
overflow: auto;
|
|
|
|
|
--va-card-display: flex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-table {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|