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.

Queue remove action

+49 -7
+47 -6
src/Applications/UI/Queue.elm
··· 1 1 module UI.Queue exposing (initialModel, update, view) 2 2 3 3 import Chunky exposing (..) 4 + import Color.Ext as Color 4 5 import Conditional exposing (..) 6 + import Css 5 7 import Html.Styled as Html exposing (Html, fromUnstyled, text) 8 + import Html.Styled.Attributes exposing (css) 6 9 import List.Extra as List 7 10 import Material.Icons exposing (Coloring(..)) 8 11 import Material.Icons.Action as Icons 12 + import Material.Icons.Av as Icons 13 + import Material.Icons.Content as Icons 9 14 import Material.Icons.Image as Icons 10 15 import Material.Icons.Navigation as Icons 11 16 import Queue exposing (..) ··· 157 162 |> returnRepliesWithModel { model | future = newFuture } 158 163 |> addReply FillQueue 159 164 165 + -- # RemoveItem 166 + -- > Remove a future item. 167 + -- 168 + RemoveItem { index, item } -> 169 + let 170 + newFuture = 171 + List.removeAt index model.future 172 + 173 + newIgnored = 174 + if item.manualEntry then 175 + model.ignored 176 + 177 + else 178 + item :: model.ignored 179 + in 180 + returnRepliesWithModel 181 + { model | future = newFuture, ignored = newIgnored } 182 + [ FillQueue ] 183 + 160 184 ----------------------------------------- 161 185 -- Position 162 186 ----------------------------------------- ··· 314 338 , Label "Back to list" Hidden 315 339 , NavigateToPage Page.Index 316 340 ) 317 - , ( Icon Icons.event_seat 341 + , ( Icon Icons.history 318 342 , Label "History" Shown 319 343 , NavigateToPage (Page.Queue History) 320 344 ) 321 - , ( Icon Icons.cancel 345 + , ( Icon Icons.clear 322 346 , Label "Clear all" Shown 323 347 , PerformMsg Clear 324 348 ) 325 - , ( Icon Icons.restore 349 + , ( Icon Icons.clear 326 350 , Label "Clear ignored" Shown 327 351 , PerformMsg Reset 328 352 ) ··· 348 372 item.identifiedTrack 349 373 in 350 374 { label = 351 - inline 352 - [ ifThenElse item.manualEntry T.o_100 T.o_50 ] 375 + slab 376 + Html.span 377 + (if item.manualEntry then 378 + [] 379 + 380 + else 381 + [ UI.Kit.colorKit.base05 382 + |> Color.toElmCssColor 383 + |> Css.color 384 + |> List.singleton 385 + |> css 386 + ] 387 + ) 388 + [] 353 389 [ inline 354 390 [ T.dib, T.f7, T.mr2 ] 355 391 [ text (String.fromInt <| idx + 1), text "." ] 356 392 , text (track.tags.artist ++ " - " ++ track.tags.title) 357 393 ] 358 394 , actions = 359 - [] 395 + [ { color = Color (ifThenElse item.manualEntry UI.Kit.colorKit.base03 UI.Kit.colorKit.base07) 396 + , icon = ifThenElse item.manualEntry Icons.remove_circle_outline Icons.not_interested 397 + , msg = Just (\_ -> RemoveItem { index = idx, item = item }) 398 + , title = ifThenElse item.manualEntry "Remove" "Ignore" 399 + } 400 + ] 360 401 } 361 402 362 403
+1
src/Applications/UI/Queue/Core.elm
··· 37 37 ------------------------------------ 38 38 | InjectFirst { showNotification : Bool } (List IdentifiedTrack) 39 39 | InjectLast { showNotification : Bool } (List IdentifiedTrack) 40 + | RemoveItem { index : Int, item : Item } 40 41 ------------------------------------ 41 42 -- Position 42 43 ------------------------------------
+1 -1
src/Applications/UI/Tracks.elm
··· 484 484 ----------------------------------------- 485 485 UI.Navigation.localWithTabindex 486 486 tabindex_ 487 - [ ( Icon Icons.format_list_numbered 487 + [ ( Icon Icons.waves 488 488 , Label "Playlists" Hidden 489 489 , PerformMsg Bypass 490 490 )