Something went wrong. Try again.
A music player that connects to your cloud/distributed storage. forked from tokono.ma/diffuse
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156module UI.Queue.ContextMenu exposing (futureMenu, futureNavigationMenu, historyMenu)
import ContextMenu exposing (..)import Coordinates exposing (Coordinates)import Material.Icons.Round as Iconsimport Queueimport UI.Queue.Types as Queueimport UI.Tracks.ContextMenuimport UI.Types exposing (Msg(..))
-- 🔱
futureMenu : { cached : List String, cachingInProgress : List String, itemIndex : Int } -> Queue.Item -> Coordinates -> ContextMenu MsgfutureMenu { cached, cachingInProgress, itemIndex } item = let tracks = [ item.identifiedTrack ] in ContextMenu [ Item { icon = Icons.update , label = "Move to the top" , msg = { index = itemIndex } |> Queue.MoveItemToFirst |> QueueMsg
-- , active = False } , Item { icon = Icons.update , label = "Move to the end of my picks" , msg = { index = itemIndex } |> Queue.MoveItemToLast |> QueueMsg
-- , active = False } , Item { icon = Icons.waves , label = "Add to collection" , msg = AssistWithAddingTracksToCollection tracks , active = False } , Item { icon = Icons.waves , label = "Add to playlist" , msg = AssistWithAddingTracksToPlaylist tracks , active = False } , UI.Tracks.ContextMenu.cacheAction { cached = cached, cachingInProgress = cachingInProgress } tracks ]
futureNavigationMenu : { manualEntries : List Queue.Item } -> Coordinates -> ContextMenu MsgfutureNavigationMenu { manualEntries } = [ [ Item { icon = Icons.not_interested , label = "Reset ignored" , msg = QueueMsg Queue.ResetIgnored
-- , active = False } ] , -- if List.isEmpty manualEntries then []
else [ Item { icon = Icons.waves , label = "Add queue picks to collection" , msg = manualEntries |> List.map .identifiedTrack |> AssistWithAddingTracksToCollection , active = False } , Item { icon = Icons.waves , label = "Add queue picks to playlist" , msg = manualEntries |> List.map .identifiedTrack |> AssistWithAddingTracksToPlaylist , active = False } ] ] |> List.concat |> ContextMenu
historyMenu : { cached : List String, cachingInProgress : List String } -> Queue.Item -> Coordinates -> ContextMenu MsghistoryMenu { cached, cachingInProgress } item = let tracks = [ item.identifiedTrack ] in ContextMenu [ Item { icon = Icons.update , label = "Play next" , msg = { inFront = True, tracks = tracks } |> Queue.AddTracks |> QueueMsg
-- , active = False } , Item { icon = Icons.update , label = "Add to queue" , msg = { inFront = False, tracks = tracks } |> Queue.AddTracks |> QueueMsg
-- , active = False } , Item { icon = Icons.waves , label = "Add to collection" , msg = AssistWithAddingTracksToCollection tracks , active = False } , Item { icon = Icons.waves , label = "Add to playlist" , msg = AssistWithAddingTracksToPlaylist tracks , active = False } , UI.Tracks.ContextMenu.cacheAction { cached = cached, cachingInProgress = cachingInProgress } tracks ]