some fixes to inline

This commit is contained in:
vapormusic 2022-03-26 22:47:29 +07:00
parent 272d3392a1
commit fedd28d8a6
2 changed files with 5 additions and 10 deletions

View file

@ -55,12 +55,6 @@
app: this.$root, app: this.$root,
} }
}, },
watch:{
data: function(newVal, oldVal) {
console.log("newdata",newVal);
},
},
methods: { methods: {
getKind(item) { getKind(item) {
if (typeof item.kind != "undefined") { if (typeof item.kind != "undefined") {

View file

@ -12,8 +12,8 @@
</libraryartist-item> </libraryartist-item>
</div> </div>
<div class="episodes-list" > <div class="episodes-list" >
<div class="episodes-inline-info"> <div class="episodes-inline-info" v-if="clready">
<inline-collection-list v-if="clresponse != []" :data="clresponse" :type="cltype" :title="cltitle"></inline-collection-list> <inline-collection-list :data="clresponse" :type="cltype" :title="cltitle"></inline-collection-list>
</div> </div>
</div> </div>
</div> </div>
@ -47,6 +47,7 @@
response: null, title: null, type: null, requestBody: null response: null, title: null, type: null, requestBody: null
}, },
clresponse: [], clresponse: [],
clready: false,
cltitle: '', cltitle: '',
cltype: "artists", cltype: "artists",
@ -56,6 +57,7 @@
let self = this; let self = this;
this.$root.$on('ap-inlinecollection', function(e){ this.$root.$on('ap-inlinecollection', function(e){
console.log("hey",e) console.log("hey",e)
self.clready = true;
self.clresponse = e.response; self.clresponse = e.response;
self.cltitle = e.title ?? ''; self.cltitle = e.title ?? '';
self.cltype = e.type ; self.cltype = e.type ;
@ -83,7 +85,7 @@
:type="item.type"></mediaitem-artwork> :type="item.type"></mediaitem-artwork>
</div> </div>
<div class="info-rect" :style="{'padding-left': (showArtwork ? '' : '16px')}" <div class="info-rect" :style="{'padding-left': (showArtwork ? '' : '16px')}"
@dblclick="app.routeView(item)"> @dblclick="select">
<div class="title text-overflow-elipsis"> <div class="title text-overflow-elipsis">
{{ item.attributes.name }} {{ item.attributes.name }}
</div> </div>
@ -140,7 +142,6 @@
//app.select_selectMediaItem(u.id, this.getDataType(), this.index, this.guid, true) //app.select_selectMediaItem(u.id, this.getDataType(), this.index, this.guid, true)
}, },
showCollection(response, title, type, requestBody = {}){ showCollection(response, title, type, requestBody = {}){
console.log(response, title, type, requestBody);
this.$root.$emit('ap-inlinecollection', { this.$root.$emit('ap-inlinecollection', {
response: response, title: title, type: type, requestBody: {}} response: response, title: title, type: type, requestBody: {}}
); );