fix #1118 properly
This commit is contained in:
parent
c9363e338c
commit
5b0a3d431a
1 changed files with 20 additions and 7 deletions
|
@ -1,8 +1,7 @@
|
||||||
<script type="text/x-template" id="cider-collection-list">
|
<script type="text/x-template" id="cider-collection-list">
|
||||||
<div class="content-inner collection-page">
|
<div class="content-inner collection-page">
|
||||||
<h3 class="header-text" v-observe-visibility="{callback: headerVisibility}">{{ title }}</h3>
|
<h3 class="header-text" v-observe-visibility="{callback: headerVisibility}">{{ title }}</h3>
|
||||||
<div v-if="data['data'] != 'null'" class="well itemContainer" >
|
<div v-if="data['data'] != 'null'" class="well itemContainer" :class="getClasses()">
|
||||||
<!-- :class="getClasses()"> -->
|
|
||||||
<template v-for="(item, key) in data.data">
|
<template v-for="(item, key) in data.data">
|
||||||
<template v-if="item.type == 'artists'">
|
<template v-if="item.type == 'artists'">
|
||||||
<mediaitem-square :item="item"></mediaitem-square>
|
<mediaitem-square :item="item"></mediaitem-square>
|
||||||
|
@ -59,19 +58,33 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getClasses() {
|
getClasses() {
|
||||||
if(this.commonKind != "song") {
|
if ((this.data?.data?.length ?? 0) > 0) {
|
||||||
return "collection-list-square";
|
let item = this.data.data[0]
|
||||||
}else{
|
if (typeof item.kind != "undefined") {
|
||||||
|
this.commonKind = item.kind;
|
||||||
|
return item.kind
|
||||||
|
}
|
||||||
|
if (typeof item.attributes.playParams != "undefined") {
|
||||||
|
this.commonKind = item.attributes.playParams.kind
|
||||||
|
return item.attributes.playParams.kind
|
||||||
|
}
|
||||||
|
if (this.commonKind != "song") {
|
||||||
|
return "collection-list-square";
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getKind(item) {
|
getKind(item) {
|
||||||
if (typeof item.kind != "undefined") {
|
if (typeof item.kind != "undefined") {
|
||||||
this.commonKind = item.kind;
|
// this.commonKind = item.kind;
|
||||||
return item.kind
|
return item.kind
|
||||||
}
|
}
|
||||||
if (typeof item.attributes.playParams != "undefined") {
|
if (typeof item.attributes.playParams != "undefined") {
|
||||||
this.commonKind = item.attributes.playParams.kind
|
// this.commonKind = item.attributes.playParams.kind
|
||||||
return item.attributes.playParams.kind
|
return item.attributes.playParams.kind
|
||||||
}
|
}
|
||||||
return this.commonKind
|
return this.commonKind
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue