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.

More group improvements

+19 -16
+1 -1
src/Applications/UI/Tracks.elm
··· 105 105 |> Maybe.map 106 106 (case model.scene of 107 107 List -> 108 - UI.Tracks.Scene.List.scrollToNowPlaying 108 + UI.Tracks.Scene.List.scrollToNowPlaying model.collection.harvested 109 109 ) 110 110 |> Maybe.map 111 111 (\cmd ->
+18 -15
src/Applications/UI/Tracks/Scene/List.elm
··· 16 16 import Html.Styled.Lazy 17 17 import InfiniteList 18 18 import Material.Icons exposing (Coloring(..)) 19 - import Material.Icons.Maps as Icons 19 + import Material.Icons.Av as Icons 20 20 import Material.Icons.Navigation as Icons 21 21 import Tachyons.Classes as T 22 22 import Task ··· 65 65 "diffuse__track-list" 66 66 67 67 68 - scrollToNowPlaying : IdentifiedTrack -> Cmd Msg 69 - scrollToNowPlaying ( identifiers, track ) = 70 - (22 - toFloat rowHeight / 2 + 5 + toFloat identifiers.indexInList * toFloat rowHeight) 68 + scrollToNowPlaying : List IdentifiedTrack -> IdentifiedTrack -> Cmd Msg 69 + scrollToNowPlaying harvest ( identifiers, _ ) = 70 + harvest 71 + |> List.take identifiers.indexInList 72 + |> List.foldl (\a -> (+) <| dynamicRowHeight 0 a) 0 73 + |> (\n -> 22 - toFloat rowHeight / 2 + 5 + toFloat n) 71 74 |> Dom.setViewportOf containerId 0 72 75 |> Task.attempt (always Bypass) 73 76 ··· 202 205 203 206 204 207 dynamicRowHeight : Int -> IdentifiedTrack -> Int 205 - dynamicRowHeight idx ( i, t ) = 208 + dynamicRowHeight _ ( i, t ) = 206 209 let 207 210 shouldRenderGroup = 208 211 i.group ··· 210 213 |> Maybe.withDefault False 211 214 in 212 215 if shouldRenderGroup then 213 - rowHeight + 35 216 + 32 + 18 + 16 + rowHeight 214 217 215 218 else 216 219 rowHeight ··· 249 252 in 250 253 Html.toUnstyled <| 251 254 Html.div 252 - [] 255 + [ id ("track-" ++ String.fromInt identifiers.indexInList) ] 253 256 [ if shouldRenderGroup then 254 - groupNode identifiers 257 + groupNode idx identifiers 255 258 256 259 else 257 260 nothing ··· 296 299 -- ROWS 297 300 298 301 299 - groupNode : Identifiers -> Html Msg 300 - groupNode identifiers = 302 + groupNode : Int -> Identifiers -> Html Msg 303 + groupNode idx identifiers = 301 304 let 302 305 groupName = 303 306 identifiers.group ··· 309 312 [ T.f7 310 313 , T.fw7 311 314 , T.lh_copy 312 - , T.mb3 313 - , T.mh3 314 - , T.mt4 315 + , T.pb3 316 + , T.ph3 317 + , ifThenElse (0 == idx) T.pt3 T.pt4 315 318 , T.truncate 316 319 ] 317 320 [ inline 318 321 [ T.dib, T.pr2, T.v_mid, C.lh_0 ] 319 - [ Html.fromUnstyled (Icons.terrain 22 Inherit) ] 322 + [ Html.fromUnstyled (Icons.library_music 16 Inherit) ] 320 323 , inline 321 324 [ T.v_mid ] 322 325 [ text groupName ] ··· 328 331 [ Css.color (Color.toElmCssColor UI.Kit.colorKit.base04) 329 332 , Css.fontFamilies UI.Kit.headerFontFamilies 330 333 , Css.fontSize (Css.px 11.5) 331 - , Css.letterSpacing (Css.em 0.0375) 334 + , Css.letterSpacing (Css.em 0.03) 332 335 ] 333 336 334 337