Loading image
This commit is contained in:
parent
72b0e8775c
commit
af6afdc1dc
|
@ -27,6 +27,7 @@ type alias Model =
|
|||
|
||||
type Page
|
||||
= Home
|
||||
| Loading
|
||||
| Playlist Twitch.PlaylistWithVideos
|
||||
| Video Twitch.PlaylistWithVideos Twitch.Video
|
||||
|
||||
|
@ -165,14 +166,14 @@ update msg model =
|
|||
)
|
||||
|
||||
( ( _, _ ), ( Just name, Nothing ) ) ->
|
||||
( m.page
|
||||
( Loading
|
||||
, Task.perform
|
||||
PlaylistReceived
|
||||
(Twitch.fetchPlaylistWithVideos name)
|
||||
)
|
||||
|
||||
( ( _, _ ), ( Just name, Just video ) ) ->
|
||||
( m.page
|
||||
( Loading
|
||||
, Task.perform
|
||||
(PlaylistReceivedVideo video time)
|
||||
(Twitch.fetchPlaylistWithVideos name)
|
||||
|
|
|
@ -55,6 +55,9 @@ title model =
|
|||
Core.Home ->
|
||||
Consts.url
|
||||
|
||||
Core.Loading ->
|
||||
Consts.url
|
||||
|
||||
Core.Playlist p ->
|
||||
Consts.url ++ " - " ++ p.name
|
||||
|
||||
|
@ -68,6 +71,9 @@ viewContent model =
|
|||
Core.Home ->
|
||||
playlistsView model.device model.playlists
|
||||
|
||||
Core.Loading ->
|
||||
Element.el [ Element.padding 10, Element.centerX ] spinner
|
||||
|
||||
Core.Playlist playlist ->
|
||||
videoMiniaturesView model.device model.zone playlist
|
||||
|
||||
|
|
Loading…
Reference in New Issue