Add:User listening stats page and new library stats

This commit is contained in:
advplyr 2021-12-29 15:53:19 -06:00
parent 7845e06a24
commit b80d735750
13 changed files with 326 additions and 120 deletions

View file

@ -13,6 +13,11 @@ export const getters = {
getCurrentLibrary: state => {
return state.libraries.find(lib => lib.id === state.currentLibraryId)
},
getCurrentLibraryName: (state, getters) => {
var currentLibrary = getters.getCurrentLibrary
if (!currentLibrary) return ''
return currentLibrary.name
},
getSortedLibraries: state => () => {
return state.libraries.map(lib => ({ ...lib })).sort((a, b) => a.displayOrder - b.displayOrder)
}