add library videos page
This commit is contained in:
parent
aa11c208d8
commit
df14eb4ba6
5 changed files with 47 additions and 0 deletions
34
src/renderer/views/pages/library-videos.ejs
Normal file
34
src/renderer/views/pages/library-videos.ejs
Normal file
|
@ -0,0 +1,34 @@
|
|||
<script type="text/x-template" id="cider-library-videos">
|
||||
<div class="content-inner">
|
||||
<div class="row">
|
||||
<div class="col" style="padding:0">
|
||||
<h1 class="header-text">{{$root.getLz('term.videos')}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="madeforyou-body">
|
||||
<mediaitem-square :size="300" :item="item" v-for="item in videos">
|
||||
</mediaitem-square>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('cider-library-videos', {
|
||||
template: "#cider-library-videos",
|
||||
props: ["data"],
|
||||
data: function(){
|
||||
return {
|
||||
app : this.$root,
|
||||
videos: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(async function () {
|
||||
if (this.$data.videos == null || this.$data.videos.length == 0)
|
||||
this.$data.videos = (await app.mk.api.v3.music('/v1/me/library/music-videos')).data?.data ?? []
|
||||
console.log(this.$data.videos.length > 0)
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue