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.

Add foundation for new-source form

+172 -71
+6 -4
src/Applications/UI.elm
··· 254 254 [ style "max-width" (String.fromFloat UI.Kit.insulationWidth ++ "px") ] 255 255 [ T.bg_white 256 256 , T.br2 257 + , T.flex 258 + , T.flex_column 257 259 , T.flex_grow_1 258 260 , T.overflow_hidden 259 261 , T.w_100 260 262 ] 261 - [ case model.page of 263 + (case model.page of 262 264 Page.Index -> 263 265 -- TODO: Tracks 264 - empty 266 + [ empty ] 265 267 266 268 Page.NotFound -> 267 269 -- TODO 268 - text "Page not found." 270 + [ text "Page not found." ] 269 271 270 272 Page.Settings -> 271 273 UI.Settings.view model 272 274 273 275 Page.Sources subPage -> 274 276 UI.Sources.view model subPage 275 - ] 277 + ) 276 278 277 279 ----------------------------------------- 278 280 -- Controls
+15 -1
src/Applications/UI/Kit.elm
··· 1 - module UI.Kit exposing (canister, colorKit, colors, defaultFont, h1, headerFont, insulationWidth, intro) 1 + module UI.Kit exposing (canister, colorKit, colors, defaultFont, h1, h2, headerFont, insulationWidth, intro) 2 2 3 3 import Chunky exposing (..) 4 4 import Color ··· 102 102 , T.relative 103 103 , T.ttu 104 104 , T.white 105 + ] 106 + [ Html.text text ] 107 + 108 + 109 + h2 : String -> Html msg 110 + h2 text = 111 + slab 112 + Html.h2 113 + [ style "font-family" headerFont ] 114 + [ T.f3 115 + , T.fw7 116 + , T.lh_title 117 + , T.mb4 118 + , T.mt0 105 119 ] 106 120 [ Html.text text ] 107 121
+2 -1
src/Applications/UI/Navigation.elm
··· 158 158 , T.justify_center 159 159 , T.lh_solid 160 160 , T.no_underline 161 - , T.ph2 161 + , T.outline_0 162 + , T.ph3 162 163 ] 163 164 [ icon UI.Kit.colors.text 16 164 165
+4
src/Applications/UI/Page.elm
··· 46 46 Sources Sources.Index -> 47 47 "/sources" 48 48 49 + Sources (Sources.New _) -> 50 + "/sources/new" 51 + 49 52 50 53 51 54 -- ⚗️ ··· 60 63 61 64 -- Sources 62 65 , map (Sources Sources.Index) (s "sources") 66 + , map (Sources <| Sources.New Sources.newForm) (s "sources" </> s "new") 63 67 ]
+26 -28
src/Applications/UI/Settings.elm
··· 15 15 -- 🗺 16 16 17 17 18 - view : UI.Core.Model -> Html UI.Core.Msg 18 + view : UI.Core.Model -> List (Html UI.Core.Msg) 19 19 view = 20 20 index 21 21 ··· 24 24 -- PAGES 25 25 26 26 27 - index : UI.Core.Model -> Html UI.Core.Msg 27 + index : UI.Core.Model -> List (Html UI.Core.Msg) 28 28 index model = 29 - chunk 30 - [] 31 - [ ----------------------------------------- 32 - -- Navigation 33 - ----------------------------------------- 34 - UI.Navigation.local 35 - [ ( Icon Icons.import_export 36 - , Label "Import / Export" Shown 37 - , PerformMsg UI.Core.Bypass 38 - ) 39 - , ( Icon Icons.exit_to_app 40 - , Label "Sign out" Shown 41 - , PerformMsg UI.Core.Bypass 42 - ) 43 - ] 44 - model.page 29 + [ ----------------------------------------- 30 + -- Navigation 31 + ----------------------------------------- 32 + UI.Navigation.local 33 + [ ( Icon Icons.import_export 34 + , Label "Import / Export" Shown 35 + , PerformMsg UI.Core.Bypass 36 + ) 37 + , ( Icon Icons.exit_to_app 38 + , Label "Sign out" Shown 39 + , PerformMsg UI.Core.Bypass 40 + ) 41 + ] 42 + model.page 45 43 46 - ----------------------------------------- 47 - -- Content 48 - ----------------------------------------- 49 - , UI.Kit.canister 50 - [ UI.Kit.h1 "Settings" 51 - , [ text "Changes are automatically saved." 52 - ] 53 - |> Html.span [] 54 - |> UI.Kit.intro 55 - ] 44 + ----------------------------------------- 45 + -- Content 46 + ----------------------------------------- 47 + , UI.Kit.canister 48 + [ UI.Kit.h1 "Settings" 49 + , [ text "Changes are automatically saved." 50 + ] 51 + |> Html.span [] 52 + |> UI.Kit.intro 56 53 ] 54 + ]
+76 -33
src/Applications/UI/Sources.elm
··· 17 17 -- 🗺 18 18 19 19 20 - view : UI.Core.Model -> Sources.Page -> Html UI.Core.Msg 20 + view : UI.Core.Model -> Sources.Page -> List (Html UI.Core.Msg) 21 21 view model page = 22 22 case page of 23 23 Index -> 24 24 index model 25 25 26 + New form -> 27 + new form model 26 28 27 29 28 - -- PAGES 29 30 31 + -- INDEX 30 32 31 - index : UI.Core.Model -> Html UI.Core.Msg 33 + 34 + index : UI.Core.Model -> List (Html UI.Core.Msg) 32 35 index model = 33 - chunk 34 - [] 35 - [ ----------------------------------------- 36 - -- Navigation 37 - ----------------------------------------- 38 - UI.Navigation.local 39 - [ ( Icon Icons.add 40 - , Label "Add a new source" Shown 41 - , GoToPage (Page.Sources Sources.Index) 42 - ) 43 - , ( Icon Icons.sync 44 - , Label "Process sources" Shown 45 - , PerformMsg UI.Core.Bypass 46 - ) 47 - ] 48 - model.page 36 + [ ----------------------------------------- 37 + -- Navigation 38 + ----------------------------------------- 39 + UI.Navigation.local 40 + [ ( Icon Icons.add 41 + , Label "Add a new source" Shown 42 + , GoToPage (Page.Sources <| New newForm) 43 + ) 44 + , ( Icon Icons.sync 45 + , Label "Process sources" Shown 46 + , PerformMsg UI.Core.Bypass 47 + ) 48 + ] 49 + model.page 50 + 51 + ----------------------------------------- 52 + -- Content 53 + ----------------------------------------- 54 + , UI.Kit.canister 55 + [ UI.Kit.h1 "Sources" 56 + , [ text "A source is a place where your music is stored." 57 + , lineBreak 58 + , text "By connecting a source, the application will scan it and keep a list of all the music in it." 59 + , lineBreak 60 + , text "It will not copy anything." 61 + ] 62 + |> Html.span [] 63 + |> UI.Kit.intro 64 + ] 65 + ] 66 + 67 + 68 + 69 + -- NEW 70 + 71 + 72 + new : Form -> UI.Core.Model -> List (Html UI.Core.Msg) 73 + new form = 74 + case form.step of 75 + Where -> 76 + newWhere form 77 + 78 + _ -> 79 + always [ empty ] 80 + 81 + 82 + newWhere : Form -> UI.Core.Model -> List (Html UI.Core.Msg) 83 + newWhere { context } model = 84 + [ ----------------------------------------- 85 + -- Navigation 86 + ----------------------------------------- 87 + UI.Navigation.local 88 + [ ( Icon Icons.arrow_back 89 + , Label "Back to list" Hidden 90 + , GoToPage (Page.Sources Sources.Index) 91 + ) 92 + ] 93 + model.page 49 94 50 - ----------------------------------------- 51 - -- Content 52 - ----------------------------------------- 53 - , UI.Kit.canister 54 - [ UI.Kit.h1 "Sources" 55 - , [ text "A source is a place where your music is stored." 56 - , lineBreak 57 - , text "By connecting a source, the application will scan it and keep a list of all the music in it." 58 - , lineBreak 59 - , text "It will not copy anything." 60 - ] 61 - |> Html.span [] 62 - |> UI.Kit.intro 63 - ] 95 + ----------------------------------------- 96 + -- Content 97 + ----------------------------------------- 98 + , chunk 99 + [ T.flex 100 + , T.flex_grow_1 101 + , T.items_center 102 + , T.justify_center 103 + , T.relative 104 + ] 105 + [ UI.Kit.h2 "Where is your music stored?" 64 106 ] 107 + ]
+40 -1
src/Library/Sources.elm
··· 1 - module Sources exposing (Page(..), Service(..), Source, SourceData) 1 + module Sources exposing (Form, FormStep(..), Page(..), Service(..), Source, SourceData, defaultService, emptySource, newForm) 2 2 3 3 import Dict exposing (Dict) 4 4 ··· 28 28 = AmazonS3 29 29 30 30 31 + defaultService : Service 32 + defaultService = 33 + AmazonS3 34 + 35 + 31 36 32 37 -- PAGE 33 38 34 39 35 40 type Page 36 41 = Index 42 + | New Form 43 + 44 + 45 + 46 + -- FORM 47 + 48 + 49 + type alias Form = 50 + { step : FormStep, context : Source } 51 + 52 + 53 + type FormStep 54 + = Where 55 + | How 56 + | By 57 + 58 + 59 + newForm : Form 60 + newForm = 61 + { step = Where, context = emptySource } 62 + 63 + 64 + 65 + -- ⚡️ 66 + 67 + 68 + emptySource : Source 69 + emptySource = 70 + { id = "CHANGE_ME_PLEASE" 71 + , data = Dict.empty 72 + , directoryPlaylists = True 73 + , enabled = True 74 + , service = defaultService 75 + }
+3 -3
src/Static/Html/Application.html
··· 64 64 65 65 66 66 <!-- Scripts --> 67 - <script src="application.js"></script> 68 - <script src="audio-engine.js"></script> 67 + <script src="/application.js"></script> 68 + <script src="/audio-engine.js"></script> 69 69 70 70 <!-- Initialize Boot Procedure --> 71 - <script src="index.js"></script> 71 + <script src="/index.js"></script> 72 72 73 73 74 74 </body>