mirror of
https://github.com/danbee/mpd-client
synced 2025-03-04 08:39:09 +00:00
29 lines
622 B
JavaScript
29 lines
622 B
JavaScript
mpdClient.controller('library', function ($scope, api) {
|
|
$scope.show = false
|
|
|
|
$scope.$on('library:show', function () { $scope.show = true })
|
|
|
|
$scope.hide = function () { $scope.show = false }
|
|
|
|
var rootPane = {
|
|
title: 'Library',
|
|
entries: [
|
|
{ label: 'Artists', path: '/artists' },
|
|
{ label: 'Albums', path: '/albums' },
|
|
{ label: 'Songs', path: '/songs' }
|
|
]
|
|
}
|
|
|
|
$scope.panes = [rootPane]
|
|
|
|
$scope.currentPaneIndex = 0
|
|
|
|
$scope.currentPane = function () {
|
|
return $scope.panes[$scope.currentPaneIndex]
|
|
}
|
|
|
|
$scope.newPane = function (path, params) {
|
|
console.log(path)
|
|
}
|
|
})
|