···88import Html.Lazy exposing (lazy, lazy2)
99import Material.Icons.Av as Icons
1010import Material.Icons.Content as Icons
1111+import Material.Icons.Image as Icons
1112import Navigation.View as Navigation
1213import Queue.Types as Queue exposing (Item, Page(..))
1314import Routing.Types
···1920-- Styles
20212122import List.Styles exposing (Classes(..))
2222-import Styles exposing (Classes(Button, ContentBox, InsulationContent, Intro))
2323+import Styles exposing (Classes(..))
232424252526-- Helpers
···8081 []
8182 [ text "Up next" ]
8283 , if List.isEmpty futureItems then
8383- p
8484- [ cssClass Intro ]
8585- [ text "No tracks available." ]
8484+ div
8585+ [ cssClass EmptyState ]
8686+ [ Icons.music_note Color.black 16
8787+ , div
8888+ []
8989+ [ text "Nothing here yet,"
9090+ , br [] []
9191+ , text "add some music first."
9292+ ]
9393+ ]
8694 else
8795 Html.Keyed.node
8896 "ul"
···142150 []
143151 [ text "History" ]
144152 , if List.isEmpty pastItems then
145145- p
146146- [ cssClass Intro ]
147147- [ text "No tracks have been played yet." ]
153153+ div
154154+ [ cssClass EmptyState ]
155155+ [ Icons.music_note Color.black 16
156156+ , div
157157+ []
158158+ [ text "Nothing here yet,"
159159+ , br [] []
160160+ , text "play some music first."
161161+ ]
162162+ ]
148163 else
149164 Html.Keyed.node
150165 "ul"
+10-7
src/App/Settings/View.elm
···2233import Html exposing (..)
44import Html.Attributes exposing (..)
55-import Material.Icons.Action
55+import Material.Icons.Action as Icons
66+import Material.Icons.Image as Icons
67import Navigation.View as Navigation
78import Types exposing (Model, Msg(..))
89import Utils exposing (cssClass)
···2728 Navigation.insideCustom
2829 [ ( span
2930 []
3030- [ Material.Icons.Action.exit_to_app colorDerivatives.text 16
3131+ [ Icons.exit_to_app colorDerivatives.text 16
3132 , label [] [ text "Sign out" ]
3233 ]
3334 , SignOut
···4243 [ h1
4344 []
4445 [ text "Settings" ]
4545- , p
4646- [ cssClass Intro ]
4747- [ text """
4848- Not much to see here yet.
4949- """
4646+ , div
4747+ [ cssClass EmptyState ]
4848+ [ Icons.panorama_wide_angle colorDerivatives.text 16
4949+ , div
5050+ []
5151+ [ text "Coming soon"
5252+ ]
5053 ]
5154 ]
5255 ]
+53-27
src/App/Sources/View.elm
···6262 -- Navigation
6363 ------------------------------------
6464 Navigation.insideCustom
6565- [ ( span
6666- []
6767- [ Icons.add_circle_outline colorDerivatives.text 16
6868- , label [] [ text "Add a new source" ]
6969- ]
7070- , RoutingMsg (GoToUrl "/sources/new")
7171- )
7272- , ( span
6565+ (List.concat
6666+ [ -- Add
6767+ [ ( span
6868+ []
6969+ [ Icons.add colorDerivatives.text 16
7070+ , label [] [ text "Add a new source" ]
7171+ ]
7272+ , RoutingMsg (GoToUrl "/sources/new")
7373+ )
7474+ ]
7575+7676+ -- Other
7777+ , if List.isEmpty sources then
7378 []
7474- [ Icons.cloud_queue colorDerivatives.text 16
7575- , label [] [ text "Process sources" ]
7979+ else
8080+ [ ( span
8181+ []
8282+ [ Icons.sync colorDerivatives.text 16
8383+ , label [] [ text "Process sources" ]
8484+ ]
8585+ , TopLevel.ProcessSources
8686+ )
7687 ]
7777- , TopLevel.ProcessSources
7878- )
7979- ]
8888+ ]
8989+ )
80908191 ------------------------------------
8292 -- List
···8696 [ h1
8797 []
8898 [ text "Sources" ]
8989- , p
9090- [ cssClass Intro ]
9191- [ text """
9292- A source is a place where your music is stored.
9393- By connecting a source, the application will scan it
9494- and keep a list of all the music in it. It will not
9595- copy anything.
9696- """
9797- ]
9999+ , if List.isEmpty sources then
100100+ text ""
101101+ else
102102+ p
103103+ [ cssClass Intro ]
104104+ [ text """
105105+ A source is a place where your music is stored.
106106+ By connecting a source, the application will scan it
107107+ and keep a list of all the music in it. It will not
108108+ copy anything.
109109+ """
110110+ ]
9811199112 -- Check if sources are processing
100113 -- and if they have processing errors
···114127 )
115128 sources
116129 in
117117- -- Render list
118118- Html.Keyed.node
119119- "ul"
120120- [ cssClass ListWithActions ]
121121- (List.indexedMap renderSource sourcesWithContext)
130130+ if List.isEmpty sources then
131131+ -- No sources atm
132132+ div
133133+ [ cssClass EmptyState ]
134134+ [ Icons.add Color.black 16
135135+ , div
136136+ []
137137+ [ text "No sources have been added yet,"
138138+ , br [] []
139139+ , text "add one to get started."
140140+ ]
141141+ ]
142142+ else
143143+ -- Render list
144144+ Html.Keyed.node
145145+ "ul"
146146+ [ cssClass ListWithActions ]
147147+ (List.indexedMap renderSource sourcesWithContext)
122148 ]
123149 ]
124150
+1-1
src/App/Tracks/View.elm
···191191192192msgProcessing : Html TopLevel.Msg
193193msgProcessing =
194194- text "Processing Tracks ..."
194194+ text "Processing Tracks"
195195196196197197msgNoSources : Html TopLevel.Msg