Move Playlists to the sidebar menu (#1339)

* Show playlists in sidebar menu

* Fix menu

* Refresh playlist submenu when adding new playlist

* Group shared playlists below user's playlists

* Fix text overflow in menu options

* Add button in playlist menu to go to Playlists list

* Add config option `DevSidebarPlaylists` to enable this feature (default false)
This commit is contained in:
Deluan Quintão
2021-09-11 13:11:15 -04:00
committed by GitHub
parent a7017e4bb0
commit 79363d6c07
11 changed files with 211 additions and 17 deletions
+1
View File
@@ -45,6 +45,7 @@ func serveIndex(ds model.DataStore, fs fs.FS) http.HandlerFunc {
"devFastAccessCoverArt": conf.Server.DevFastAccessCoverArt,
"enableUserEditing": conf.Server.EnableUserEditing,
"devEnableShare": conf.Server.DevEnableShare,
"devSidebarPlaylists": conf.Server.DevSidebarPlaylists,
"lastFMEnabled": conf.Server.LastFM.Enabled,
"lastFMApiKey": conf.Server.LastFM.ApiKey,
}
+12
View File
@@ -211,6 +211,18 @@ var _ = Describe("serveIndex", func() {
Expect(config).To(HaveKeyWithValue("devEnableShare", false))
})
It("sets the devSidebarPlaylists", func() {
conf.Server.DevSidebarPlaylists = true
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()
serveIndex(ds, fs)(w, r)
config := extractAppConfig(w.Body.String())
Expect(config).To(HaveKeyWithValue("devSidebarPlaylists", true))
})
It("sets the lastFMEnabled", func() {
r := httptest.NewRequest("GET", "/index.html", nil)
w := httptest.NewRecorder()