added square mediaitem component
This commit is contained in:
parent
a7d87b7fa1
commit
2da89b81b1
4 changed files with 345 additions and 285 deletions
|
@ -1,4 +1,11 @@
|
|||
var app = new Vue({
|
||||
Vue.component('mediaitem-square', {
|
||||
template: '#mediaitem-square',
|
||||
props: ['item'],
|
||||
methods: {
|
||||
}
|
||||
});
|
||||
|
||||
const app = new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
drawertest: false,
|
||||
|
@ -41,6 +48,9 @@ var app = new Vue({
|
|||
return false
|
||||
}
|
||||
},
|
||||
getMediaItemArtwork(url, size = 64) {
|
||||
return `url("${url.replace('{w}', size).replace('{h}', size)}")`;
|
||||
},
|
||||
getNowPlayingArtwork(size = 600) {
|
||||
if (this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"]) {
|
||||
return `url("${this.mk["nowPlayingItem"]["attributes"]["artwork"]["url"].replace('{w}', size).replace('{h}', size)}")`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue