add reason to listennow first row
This commit is contained in:
parent
786e2b3038
commit
70e13ce6f4
5 changed files with 35 additions and 17 deletions
|
@ -1829,6 +1829,13 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
|
|||
}
|
||||
}
|
||||
|
||||
.reasonSP{
|
||||
// margin-left: 15px;
|
||||
color: rgb(167 163 163);
|
||||
font-weight: 500;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.text-overflow-elipsis {
|
||||
display: -webkit-box;
|
||||
min-width: 0px;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template v-if="isVisible && recom.attributes.display.kind != 'MusicSuperHeroShelf'">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3>{{ recom.attributes.title ? recom.attributes.title.stringForDisplay : ""}}</h3>
|
||||
<h3>{{ recom.attributes.title ? recom.attributes.title.stringForDisplay : " "}}</h3>
|
||||
</div>
|
||||
<div class="col-auto flex-center" v-if="recom.relationships.contents.data.length >= 10">
|
||||
<button class="cd-btn-seeall" @click="app.showCollection(recom.relationships.contents, recom.attributes.title ? recom.attributes.title.stringForDisplay : '', 'listen_now')" >{{app.getLz('term.seeAll')}}</button>
|
||||
|
@ -15,7 +15,8 @@
|
|||
</template>
|
||||
<template v-else>
|
||||
<mediaitem-scroller-horizontal-sp
|
||||
:items="recom.relationships.contents.data.limit(10)"></mediaitem-scroller-horizontal-sp>
|
||||
:withReason="index==0"
|
||||
:items="recom.relationships.contents.data.limit(10)"></mediaitem-scroller-horizontal-sp>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else-if="recom.attributes.display.kind != 'MusicSuperHeroShelf'">
|
||||
|
@ -27,7 +28,7 @@
|
|||
<script>
|
||||
Vue.component('listennow-child', {
|
||||
template: "#listennow-child",
|
||||
props: ["recom"],
|
||||
props: ["recom","index"],
|
||||
data: function () {
|
||||
return {
|
||||
isVisible: true,
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
<div class="cd-hmedia-scroller hmedia-scroller-card">
|
||||
<vue-horizontal>
|
||||
<template>
|
||||
<mediaitem-square kind="card" :item="item" size="300"
|
||||
<mediaitem-square kind="card" :item="item" size="300" :reasonShown="withReason"
|
||||
v-for="item in items"></mediaitem-square>
|
||||
</template>
|
||||
</template>
|
||||
</vue-horizontal>
|
||||
</div>
|
||||
</script>
|
||||
|
@ -12,7 +12,10 @@
|
|||
<script>
|
||||
Vue.component('mediaitem-scroller-horizontal-sp', {
|
||||
template: '#mediaitem-scroller-horizontal-sp',
|
||||
props: ['items'],
|
||||
props: {
|
||||
'items': { type: Array , required: false },
|
||||
'withReason': { type: Boolean, required: false, default: false },
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
app: this.$root,
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
<script type="text/x-template" id="mediaitem-square">
|
||||
<div
|
||||
tabindex="0"
|
||||
@click.self="app.routeView(item)"
|
||||
@controller-click="app.routeView(item)"
|
||||
@contextmenu.self="contextMenu"
|
||||
class="cd-mediaitem-square" :class="getClasses()" @contextmenu="contextMenu"
|
||||
v-observe-visibility="{callback: visibilityChanged}"
|
||||
:style="{'--spcolor': getBgColor()}">
|
||||
<template v-if="isVisible">
|
||||
<div tabindex="0"
|
||||
@click.self="app.routeView(item)"
|
||||
@controller-click="app.routeView(item)"
|
||||
@contextmenu.self="contextMenu"
|
||||
v-observe-visibility="{callback: visibilityChanged}"
|
||||
>
|
||||
<div v-if="reasonShown && isVisible" class="reasonSP ">{{item?.meta?.reason?.stringForDisplay ?? ' '}}</div>
|
||||
<div style="{'--spcolor': getBgColor()}"
|
||||
class="cd-mediaitem-square" :class="getClasses()" @contextmenu="contextMenu">
|
||||
<template v-if="isVisible">
|
||||
<div class="artwork-container">
|
||||
<div class="unavailable-overlay" v-if="unavailable">
|
||||
<div class="codicon codicon-circle-slash"></div>
|
||||
|
@ -47,6 +48,7 @@
|
|||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
@ -69,6 +71,11 @@
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
reasonShown: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
'contextExt': {type: Object, required: false},
|
||||
},
|
||||
data: function () {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script type="text/x-template" id="cider-listen-now">
|
||||
<div class="content-inner">
|
||||
<h1 class="header-text">{{app.getLz('term.listenNow')}}</h1>
|
||||
<template v-for="recom in data.data">
|
||||
<listennow-child :recom="recom"></listennow-child>
|
||||
<template v-for="(recom,index) in data.data">
|
||||
<listennow-child :recom="recom" :index="index"></listennow-child>
|
||||
</template>
|
||||
</div>
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue