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