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.

Sources index placeholder

+119 -56
+27 -10
src/Applications/UI/Queue.elm
··· 5 5 import Conditional exposing (..) 6 6 import Css 7 7 import Html.Styled as Html exposing (Html, fromUnstyled, text) 8 - import Html.Styled.Attributes exposing (css) 8 + import Html.Styled.Attributes exposing (css, href) 9 9 import List.Extra as List 10 10 import Material.Icons exposing (Coloring(..)) 11 11 import Material.Icons.Action as Icons ··· 29 29 import UI.Queue.Fill as Fill 30 30 import UI.Queue.Page as Queue exposing (Page(..)) 31 31 import UI.Reply exposing (Reply(..)) 32 + import UI.Sources.Page 32 33 33 34 34 35 ··· 397 398 -- Content 398 399 ----------------------------------------- 399 400 , if List.isEmpty model.future then 400 - UI.Kit.centeredContent 401 + chunk 402 + [ T.relative ] 401 403 [ chunk 402 - [ T.o_30 ] 403 - [ fromUnstyled (Icons.music_note 64 Inherit) ] 404 - , chunk 405 - [ T.lh_copy, T.mt2, T.o_40, T.tc ] 406 - [ text "Nothing here yet," 407 - , lineBreak 408 - , text "add some music first." 409 - ] 404 + [ T.absolute, T.left_0, T.top_0 ] 405 + [ UI.Kit.canister [ UI.Kit.h1 "Up next" ] ] 410 406 ] 411 407 412 408 else ··· 422 418 ) 423 419 |> chunky [ T.mt3 ] 424 420 ] 421 + 422 + -- 423 + , if List.isEmpty model.future then 424 + UI.Kit.centeredContent 425 + [ slab 426 + Html.a 427 + [ href (Page.toString <| Page.Sources UI.Sources.Page.New) ] 428 + [ T.color_inherit, T.db, T.link, T.o_30 ] 429 + [ fromUnstyled (Icons.music_note 64 Inherit) ] 430 + , slab 431 + Html.a 432 + [ href (Page.toString <| Page.Sources UI.Sources.Page.New) ] 433 + [ T.color_inherit, T.db, T.lh_copy, T.link, T.mt2, T.o_40, T.tc ] 434 + [ text "Nothing here yet," 435 + , lineBreak 436 + , text "add some music first." 437 + ] 438 + ] 439 + 440 + else 441 + nothing 425 442 ] 426 443 427 444
+91 -45
src/Applications/UI/Sources.elm
··· 5 5 import Coordinates exposing (Coordinates) 6 6 import Dict.Ext as Dict 7 7 import Html.Events.Extra.Mouse as Mouse 8 - import Html.Styled as Html exposing (Html, text) 8 + import Html.Styled as Html exposing (Html, fromUnstyled, text) 9 + import Html.Styled.Attributes exposing (href) 9 10 import Json.Decode as Json 10 11 import Material.Icons exposing (Coloring(..)) 11 12 import Material.Icons.Action as Icons ··· 16 17 import Return3 as Return exposing (..) 17 18 import Sources exposing (..) 18 19 import Sources.Encoding 20 + import Tachyons.Classes as T 19 21 import Time 20 22 import UI.Kit exposing (ButtonType(..)) 21 23 import UI.List 22 24 import UI.Navigation exposing (..) 23 - import UI.Page 25 + import UI.Page as Page 24 26 import UI.Reply exposing (Reply(..)) 25 27 import UI.Sources.Form as Form 26 28 import UI.Sources.Page as Sources exposing (..) ··· 247 249 [ ----------------------------------------- 248 250 -- Navigation 249 251 ----------------------------------------- 250 - UI.Navigation.local 251 - [ ( Icon Icons.add 252 - , Label "Add a new source" Shown 253 - , NavigateToPage (UI.Page.Sources New) 254 - ) 252 + if List.isEmpty model.collection then 253 + UI.Navigation.local 254 + [ ( Icon Icons.add 255 + , Label "Add a new source" Shown 256 + , NavigateToPage (Page.Sources New) 257 + ) 258 + ] 259 + 260 + else 261 + UI.Navigation.local 262 + [ ( Icon Icons.add 263 + , Label "Add a new source" Shown 264 + , NavigateToPage (Page.Sources New) 265 + ) 255 266 256 - -- Process 257 - ---------- 258 - , if model.isProcessing then 259 - ( Icon Icons.sync 260 - , Label "Processing sources ..." Shown 261 - , PerformMsg Bypass 262 - ) 267 + -- Process 268 + ---------- 269 + , if model.isProcessing then 270 + ( Icon Icons.sync 271 + , Label "Processing sources ..." Shown 272 + , PerformMsg Bypass 273 + ) 263 274 264 - else 265 - ( Icon Icons.sync 266 - , Label "Process sources" Shown 267 - , PerformMsg Process 268 - ) 269 - ] 275 + else 276 + ( Icon Icons.sync 277 + , Label "Process sources" Shown 278 + , PerformMsg Process 279 + ) 280 + ] 270 281 271 282 ----------------------------------------- 272 283 -- Content 273 284 ----------------------------------------- 274 - , UI.Kit.canister 275 - [ UI.Kit.h1 "Sources" 285 + , if List.isEmpty model.collection then 286 + chunk 287 + [ T.relative ] 288 + [ chunk 289 + [ T.absolute, T.left_0, T.top_0 ] 290 + [ UI.Kit.canister [ UI.Kit.h1 "Sources" ] ] 291 + ] 276 292 277 - -- Intro 278 - -------- 279 - , [ text "A source is a place where your music is stored." 280 - , lineBreak 281 - , text "By connecting a source, the application will scan it and keep a list of all the music in it." 282 - , lineBreak 283 - , text "It will not copy anything." 284 - ] 285 - |> raw 286 - |> UI.Kit.intro 293 + else 294 + UI.Kit.canister 295 + [ UI.Kit.h1 "Sources" 287 296 288 - -- List 289 - ------- 290 - , model.collection 291 - |> List.sortBy 292 - (.data >> Dict.fetch "name" "") 293 - |> List.map 294 - (\source -> 295 - { label = Html.text (Dict.fetch "name" "" source.data) 296 - , actions = sourceActions model.processingError source 297 - } 298 - ) 299 - |> UI.List.view UI.List.Normal 300 - ] 297 + -- Intro 298 + -------- 299 + , intro 300 + 301 + -- List 302 + ------- 303 + , model.collection 304 + |> List.sortBy 305 + (.data >> Dict.fetch "name" "") 306 + |> List.map 307 + (\source -> 308 + { label = Html.text (Dict.fetch "name" "" source.data) 309 + , actions = sourceActions model.processingError source 310 + } 311 + ) 312 + |> UI.List.view UI.List.Normal 313 + ] 314 + 315 + -- 316 + , if List.isEmpty model.collection then 317 + UI.Kit.centeredContent 318 + [ slab 319 + Html.a 320 + [ href (Page.toString <| Page.Sources New) ] 321 + [ T.color_inherit, T.db, T.link, T.o_30 ] 322 + [ fromUnstyled (Icons.add 64 Inherit) ] 323 + , slab 324 + Html.a 325 + [ href (Page.toString <| Page.Sources New) ] 326 + [ T.color_inherit, T.db, T.lh_copy, T.link, T.mt2, T.o_40, T.tc ] 327 + [ text "No sources have been added yet," 328 + , lineBreak 329 + , text "add one to get started." 330 + ] 331 + ] 332 + 333 + else 334 + nothing 301 335 ] 336 + 337 + 338 + intro : Html Msg 339 + intro = 340 + [ text "A source is a place where your music is stored." 341 + , lineBreak 342 + , text "By connecting a source, the application will scan it and keep a list of all the music in it." 343 + , lineBreak 344 + , text "It will not copy anything." 345 + ] 346 + |> raw 347 + |> UI.Kit.intro 302 348 303 349 304 350 sourceActions : Maybe { error : String, sourceId : String } -> Source -> List (UI.List.Action Msg)
+1 -1
src/Static/Html/Application.html
··· 37 37 <link rel="preload" href="/fonts/sourcesanspro/bold.woff" as="font" crossorigin="anonymous" /> 38 38 <link rel="preload" href="/fonts/sourcesanspro/bold.woff2" as="font" crossorigin="anonymous" /> 39 39 40 - <link rel="preload" href="/images/diffuse__icon-dark.svg" as="image" /> 40 + <link rel="preload" href="/images/diffuse__icon-dark.svg" crossorigin="anonymous" /> 41 41 42 42 </head> 43 43 <body class="min-vh-100 overflow-hidden">