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

Configure Feed

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

Accessiblity tweaks

+89 -63
+1 -1
.tool-versions
··· 1 1 elm 0.19.0 2 - nodejs 10.11.0 2 + nodejs 11.10.0
+2 -2
src/Applications/UI.elm
··· 479 479 ----------------------------------------- 480 480 , UI.Kit.vessel 481 481 [ model.tracks 482 - |> Lazy.lazy UI.Tracks.view 482 + |> Lazy.lazy2 UI.Tracks.view model.page 483 483 |> Html.map TracksMsg 484 484 485 485 -- Pages 486 486 -------- 487 487 , case model.page of 488 488 Page.Index -> 489 - empty 489 + nothing 490 490 491 491 Page.NotFound -> 492 492 -- TODO
+1 -1
src/Applications/UI/Authentication.elm
··· 139 139 |> speechBubble 140 140 141 141 Nothing -> 142 - empty 142 + nothing 143 143 ] 144 144 ] 145 145
+26 -21
src/Applications/UI/Backdrop.elm
··· 47 47 48 48 49 49 type alias Model = 50 - { chosen : String 50 + { chosen : Maybe String 51 51 , fadeIn : Bool 52 52 , loaded : List String 53 53 } ··· 55 55 56 56 initialModel : Model 57 57 initialModel = 58 - { chosen = default 58 + { chosen = Nothing 59 59 , fadeIn = True 60 60 , loaded = [] 61 61 } ··· 74 74 update msg model = 75 75 case msg of 76 76 Choose backdrop -> 77 - { model | chosen = backdrop } 77 + { model | chosen = Just backdrop } 78 78 |> R2.withNoCmd 79 79 |> R3.withReply [ Reply.SaveEnclosedUserData ] 80 80 ··· 107 107 ----------------------------------------- 108 108 109 109 110 - chosen : String -> Html Msg 111 - chosen c = 112 - let 113 - loadingDecoder = 114 - c 115 - |> Load 116 - |> Json.Decode.succeed 117 - in 118 - slab 119 - Html.img 120 - [ css chosenStyles 121 - , on "load" loadingDecoder 122 - , src ("/images/Background/" ++ c) 123 - ] 124 - [ T.fixed 125 - , T.overflow_hidden 126 - ] 127 - [] 110 + chosen : Maybe String -> Html Msg 111 + chosen maybeChosen = 112 + case maybeChosen of 113 + Just c -> 114 + let 115 + loadingDecoder = 116 + c 117 + |> Load 118 + |> Json.Decode.succeed 119 + in 120 + slab 121 + Html.img 122 + [ css chosenStyles 123 + , on "load" loadingDecoder 124 + , src ("/images/Background/" ++ c) 125 + ] 126 + [ T.fixed 127 + , T.overflow_hidden 128 + ] 129 + [] 130 + 131 + Nothing -> 132 + nothing 128 133 129 134 130 135 loaded : List String -> Bool -> Html Msg
+14 -14
src/Applications/UI/Navigation.elm
··· 1 - module UI.Navigation exposing (Action(..), Icon(..), Label(..), LabelType(..), global, local) 1 + module UI.Navigation exposing (Action(..), Icon(..), Label(..), LabelType(..), global, local, localWithTabindex) 2 2 3 3 import Chunky exposing (..) 4 4 import Color exposing (Color) ··· 7 7 import Conditional exposing (..) 8 8 import Css exposing (px, solid, transparent, zero) 9 9 import Html.Styled as Html exposing (Html, text) 10 - import Html.Styled.Attributes exposing (attribute, css, href, style, title) 10 + import Html.Styled.Attributes exposing (attribute, css, href, style, tabindex, title) 11 11 import Html.Styled.Events exposing (onClick) 12 12 import List.Extra as List 13 13 import String.Format ··· 115 115 116 116 117 117 local : List ( Icon msg, Label, Action msg ) -> Html msg 118 - local items = 118 + local = 119 + localWithTabindex 0 120 + 121 + 122 + localWithTabindex : Int -> List ( Icon msg, Label, Action msg ) -> Html msg 123 + localWithTabindex tabindex_ items = 119 124 brick 120 125 [ css localStyles ] 121 126 [ T.bb, T.flex ] 122 127 (items 123 128 |> List.reverse 124 - |> List.map localItem 129 + |> List.map (localItem tabindex_) 125 130 |> List.reverse 126 131 ) 127 132 128 133 129 - localItem : ( Icon msg, Label, Action msg ) -> Html msg 130 - localItem ( Icon icon, Label labelText labelType, action ) = 134 + localItem : Int -> ( Icon msg, Label, Action msg ) -> Html msg 135 + localItem tabindex_ ( Icon icon, Label labelText labelType, action ) = 131 136 slab 132 - (case action of 133 - GoToPage _ -> 134 - Html.a 135 - 136 - PerformMsg _ -> 137 - Html.button 138 - ) 137 + Html.a 139 138 [ case action of 140 139 GoToPage page -> 141 140 href (Page.toString page) ··· 153 152 154 153 -- 155 154 , css localItemStyles 155 + , tabindex tabindex_ 156 156 ] 157 157 [ ifThenElse (labelType == Hidden) T.flex_shrink_0 T.flex_grow_1 158 158 , T.bg_transparent ··· 171 171 -- 172 172 , case labelType of 173 173 Hidden -> 174 - empty 174 + nothing 175 175 176 176 Shown -> 177 177 slab
+1 -1
src/Applications/UI/Settings.elm
··· 79 79 (List.map 80 80 (\( v, l ) -> 81 81 Html.option 82 - [ selected (v == model.backdrop.chosen), value v ] 82 + [ selected (Just v == model.backdrop.chosen), value v ] 83 83 [ text l ] 84 84 ) 85 85 UI.Backdrop.options
+8 -4
src/Applications/UI/Sources.elm
··· 76 76 ) 77 77 78 78 Process -> 79 - ( { model | isProcessing = True } 80 - , Cmd.none 81 - , Just [ UI.Reply.ProcessSources ] 82 - ) 79 + if List.isEmpty model.collection then 80 + Return3.withNothing model 81 + 82 + else 83 + ( { model | isProcessing = True } 84 + , Cmd.none 85 + , Just [ UI.Reply.ProcessSources ] 86 + ) 83 87 84 88 ----------------------------------------- 85 89 -- Children
+22 -9
src/Applications/UI/Tracks.elm
··· 6 6 import Color.Ext as Color 7 7 import Css 8 8 import Html.Styled as Html exposing (Html, text) 9 - import Html.Styled.Attributes exposing (css, placeholder, title, value) 9 + import Html.Styled.Attributes exposing (css, placeholder, tabindex, title, value) 10 10 import Html.Styled.Events exposing (onBlur, onClick, onInput) 11 11 import Html.Styled.Ext exposing (onEnterKey) 12 12 import Html.Styled.Lazy exposing (..) ··· 25 25 import Tracks.Encoding as Encoding 26 26 import UI.Kit 27 27 import UI.Navigation exposing (..) 28 + import UI.Page exposing (Page) 28 29 import UI.Ports 29 30 import UI.Reply exposing (Reply(..)) 30 31 ··· 233 234 -- 🗺 234 235 235 236 236 - view : Model -> Html Msg 237 - view model = 237 + view : Page -> Model -> Html Msg 238 + view page model = 238 239 chunk 239 240 [] 240 - [ lazy2 241 + [ lazy3 241 242 navigation 242 243 model.favouritesOnly 243 244 model.searchTerm 245 + page 244 246 245 247 -- 246 248 , chunk ··· 252 254 ] 253 255 254 256 255 - navigation : Bool -> Maybe String -> Html Msg 256 - navigation favouritesOnly searchTerm = 257 + navigation : Bool -> Maybe String -> Page -> Html Msg 258 + navigation favouritesOnly searchTerm page = 259 + let 260 + tabindex_ = 261 + case page of 262 + UI.Page.Index -> 263 + 0 264 + 265 + _ -> 266 + -1 267 + in 257 268 chunk 258 269 [ T.flex ] 259 270 [ ----------------------------------------- ··· 274 285 , onEnterKey Search 275 286 , onInput SetSearchTerm 276 287 , placeholder "Search" 288 + , tabindex tabindex_ 277 289 , value (Maybe.withDefault "" searchTerm) 278 290 ] 279 291 [ T.bg_transparent ··· 324 336 [ Html.fromUnstyled (Icons.clear searchIconColor 16) ] 325 337 326 338 Nothing -> 327 - empty 339 + nothing 328 340 329 341 -- 2 330 342 , brick ··· 342 354 ] 343 355 344 356 -- 3 345 - , empty 357 + , nothing 346 358 ] 347 359 ] 348 360 , ----------------------------------------- 349 361 -- Part 2 350 362 ----------------------------------------- 351 - UI.Navigation.local 363 + UI.Navigation.localWithTabindex 364 + tabindex_ 352 365 [ ( Icon Icons.format_list_numbered 353 366 , Label "Playlists" Hidden 354 367 , PerformMsg Bypass
+11 -7
src/Applications/UI/UserData.elm
··· 11 11 import Tracks exposing (emptyCollection) 12 12 import Tracks.Collection as Tracks 13 13 import Tracks.Encoding as Tracks 14 + import UI.Backdrop 14 15 import UI.Core 15 16 import UI.Reply as UI 16 17 import UI.Sources as Sources ··· 102 103 exportEnclosed : UI.Core.Model -> Json.Value 103 104 exportEnclosed model = 104 105 encodeEnclosed 105 - { backgroundImage = Just model.backdrop.chosen 106 + { backgroundImage = model.backdrop.chosen 106 107 } 107 108 108 109 109 110 importEnclosed : Json.Value -> UI.Core.Model -> R3D3 UI.Core.Model UI.Core.Msg UI.Reply 110 111 importEnclosed value model = 112 + let 113 + { backdrop } = 114 + model 115 + in 111 116 case decodeEnclosed value of 112 117 Ok data -> 113 - let 114 - { backdrop } = 115 - model 116 - in 117 118 R3.withNothing 118 119 { model 119 - | backdrop = { backdrop | chosen = Maybe.withDefault backdrop.chosen data.backgroundImage } 120 + | backdrop = { backdrop | chosen = Just (Maybe.withDefault UI.Backdrop.default data.backgroundImage) } 120 121 } 121 122 122 123 Err err -> 123 124 -- TODO: Show error 124 - R3.withNothing model 125 + R3.withNothing 126 + { model 127 + | backdrop = { backdrop | chosen = Just UI.Backdrop.default } 128 + } 125 129 126 130 127 131
+3 -3
src/Library/Chunky.elm
··· 1 - module Chunky exposing (brick, bricky, chunk, chunky, empty, lineBreak, raw, rawy, slab, slaby) 1 + module Chunky exposing (brick, bricky, chunk, chunky, lineBreak, nothing, raw, rawy, slab, slaby) 2 2 3 3 {-| Chunks, blocks and slabs. 4 4 ··· 86 86 -- 5 87 87 88 88 89 - empty : Html msg 90 - empty = 89 + nothing : Html msg 90 + nothing = 91 91 Html.text "" 92 92 93 93