mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
27 lines
472 B
JavaScript
27 lines
472 B
JavaScript
can.Component.extend({
|
|
|
|
tag: 'mpd-panel-root',
|
|
|
|
template: can.view('views/panels/root.mustache'),
|
|
|
|
scope: {
|
|
depth: "@",
|
|
items: [
|
|
{ label: 'Artists', show: 'artists' },
|
|
{ label: 'Albums', show: 'albums' },
|
|
{ label: 'Songs', show: 'songs' }
|
|
]
|
|
},
|
|
|
|
helpers: {
|
|
link: function(item) {
|
|
return can.route.link(item.label, {
|
|
type: 'library',
|
|
show: item.show,
|
|
depth: +this.depth + 1
|
|
});
|
|
},
|
|
}
|
|
|
|
});
|