Keyed images

This commit is contained in:
Thomas Forgione 2020-10-05 12:00:25 +02:00
parent fd43f85240
commit 04926c41fc
1 changed files with 24 additions and 12 deletions

View File

@ -125,13 +125,19 @@ playlistsView device playlists =
playlistView : Twitch.Playlist -> Element Core.Msg playlistView : Twitch.Playlist -> Element Core.Msg
playlistView playlist = playlistView playlist =
let let
src =
Twitch.playlistMiniatureUrl playlist
image = image =
Element.image Keyed.el [ Element.width Element.fill, Element.height Element.fill ]
[ Element.width Element.fill ( src
, Element.height Element.fill , Element.image
, Element.inFront inFront [ Element.width Element.fill
] , Element.height Element.fill
{ description = "", src = Twitch.playlistMiniatureUrl playlist } , Element.inFront inFront
]
{ description = "", src = src }
)
length = length =
List.length playlist.videos List.length playlist.videos
@ -217,13 +223,19 @@ videoMiniature playlist video =
, Element.padding 5 , Element.padding 5
] ]
src =
Twitch.videoMiniatureUrl playlist video
image = image =
Element.image Keyed.el [ Element.width Element.fill, Element.height Element.fill ]
[ Element.width Element.fill ( src
, Element.height Element.fill , Element.image
, Element.inFront inFront [ Element.width Element.fill
] , Element.height Element.fill
{ description = "", src = Twitch.videoMiniatureUrl playlist video } , Element.inFront inFront
]
{ description = "", src = src }
)
label = label =
formatTime video.duration formatTime video.duration