A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Toggle directory playlists

+28 -5
+1
src/Applications/UI/ContextMenu.elm
··· 69 69 [ T.b__near_white 70 70 , T.pa3 71 71 , T.pointer 72 + , T.truncate 72 73 73 74 -- 74 75 , ifThenElse isLast "" T.bb
+18 -2
src/Applications/UI/Sources.elm
··· 70 70 ----------------------------------------- 71 71 | SourceContextMenu Source Mouse.Event 72 72 | ToggleActivation { sourceId : String } 73 + | ToggleDirectoryPlaylists { sourceId : String } 73 74 74 75 75 76 update : Msg -> Model -> Return Model Msg Reply ··· 161 162 model.collection 162 163 |> List.map 163 164 (\source -> 164 - ifThenElse 165 - (source.id == sourceId) 165 + if source.id == sourceId then 166 166 { source | enabled = not source.enabled } 167 + 168 + else 169 + source 170 + ) 171 + |> (\collection -> { model | collection = collection }) 172 + |> return 173 + |> addReply SaveSources 174 + 175 + ToggleDirectoryPlaylists { sourceId } -> 176 + model.collection 177 + |> List.map 178 + (\source -> 179 + if source.id == sourceId then 180 + { source | directoryPlaylists = not source.directoryPlaylists } 181 + 182 + else 167 183 source 168 184 ) 169 185 |> (\collection -> { model | collection = collection })
+9 -3
src/Applications/UI/Sources/ContextMenu.elm
··· 1 1 module UI.Sources.ContextMenu exposing (sourceMenu) 2 2 3 + import Conditional exposing (ifThenElse) 3 4 import ContextMenu exposing (..) 4 5 import Coordinates exposing (Coordinates) 5 6 import Material.Icons.Action as Icons 7 + import Material.Icons.File as Icons 6 8 import Material.Icons.Image as Icons 7 9 import Sources exposing (Source) 8 10 import UI.Core exposing (Msg(..)) ··· 18 20 sourceMenu : Source -> Coordinates -> ContextMenu Msg 19 21 sourceMenu source = 20 22 ContextMenu 21 - [ ( Icons.edit 22 - , "Edit" 23 + [ ( ifThenElse source.directoryPlaylists Icons.folder Icons.folder_open 24 + , ifThenElse source.directoryPlaylists "Disable Directory Playlists" "Enable Directory Playlists" 25 + , SourcesMsg (Sources.ToggleDirectoryPlaylists { sourceId = source.id }) 26 + ) 27 + , ( Icons.edit 28 + , "Edit source" 23 29 , source.id 24 30 |> UI.Sources.Page.Edit 25 31 |> UI.Page.Sources 26 32 |> ChangeUrlUsingPage 27 33 ) 28 34 , ( Icons.delete 29 - , "Remove" 35 + , "Remove source" 30 36 , SourcesMsg (Sources.RemoveFromCollection { sourceId = source.id }) 31 37 ) 32 38 ]