1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/assets/js/components/panel-root.js
2014-01-10 17:01:34 +00:00

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
});
},
}
});