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:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user