@@ -48,8 +48,9 @@ templ playlistHeader(pl entities.Playlist) {
48
48
type =" button"
49
49
title =" Play playlist"
50
50
onClick ={ playSongFromPlaylist (pl.Songs [0 ].YtId , pl) }
51
- >@ icons.PlayPlaylist ()
52
- </button >
51
+ >
52
+ @ icons.PlayPlaylist ()
53
+ </button >
53
54
}
54
55
</div >
55
56
}
@@ -70,7 +71,7 @@ templ playlistContent(pl entities.Playlist) {
70
71
@ song.Song (
71
72
s,
72
73
[]string{},
73
- []templ.Component{songOptionsMobile(s, pl.PublicId)},
74
+ []templ.Component{songOptionsMobile(s), removeSong(s , pl.PublicId)},
74
75
playSongFromPlaylist(s.YtId, pl),
75
76
false,
76
77
)
@@ -96,14 +97,14 @@ templ removeSong(song entities.Song, playlistId string) {
96
97
if perm , ok := ctx.Value (" playlist-permission" ).(models.PlaylistPermissions ); ok && (perm & models.JoinerPermission ) != 0 {
97
98
<button
98
99
class ={
99
- " popover-trigger" , " p-2 " , " rounded-md" , " hover:bg-[#DE3333]" , " text-secondary" ,
100
+ " popover-trigger" , " p-1 " , " rounded-md" , " hover:bg-[#DE3333]" , " text-secondary" , " hover:text-white " ,
100
101
" flex" , " items-center" , " gap-x-2" , " w-full" ,
101
102
}
102
103
title ={ " Remove " + song.Title + " !" }
103
104
type =" button"
104
105
onClick ={ removeSongFromPlaylist (song.YtId , playlistId) }
105
106
>
106
- <svg width =" 30" height =" 34" viewBox =" 0 0 30 34" fill =" none" xmlns =" http://www.w3.org/2000/svg" >
107
+ <svg class ={ " hover:stroke-white " } width =" 30" height =" 34" viewBox =" 0 0 30 34" fill =" none" xmlns =" http://www.w3.org/2000/svg" >
107
108
<path d =" M11.6129 14.8387V24.5161" stroke =" var(--secondary-color)" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ></path >
108
109
<path d =" M18.0647 14.8387V24.5161" stroke =" var(--secondary-color)" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ></path >
109
110
<path d =" M1.93555 8.38712H27.742" stroke =" var(--secondary-color)" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ></path >
@@ -115,9 +116,9 @@ templ removeSong(song entities.Song, playlistId string) {
115
116
}
116
117
}
117
118
118
- templ songOptionsMobile (song entities.Song , playlistId string ) {
119
+ templ songOptionsMobile (song entities.Song ) {
119
120
<div
120
- class ={ " w-[250px]" , " h-full" , " flex" , " flex-col" , " gap-y-2" , }
121
+ class ={ " w-[250px]" , " h-full" , " flex" , " flex-col" , " gap-y-2" , " p-2 " }
121
122
>
122
123
<h3 class ={ " text-lg" , " font-medium" }>Details and options</h3 >
123
124
<p class ={ " text-md" , " max-w-[200px]" , " lg:max-w-[600px]" , " overflow-hidden" , " text-nowrap" , " text-ellipsis" }>Added on { song.AddedAt }</p >
@@ -126,7 +127,6 @@ templ songOptionsMobile(song entities.Song, playlistId string) {
126
127
} else if song.PlayTimes > 1 {
127
128
<p class ={ " text-md" , " max-w-[200px]" , " overflow-hidden" , " text-nowrap" , " text-ellipsis" }>Played { fmt.Sprint ( song.PlayTimes ) } times</p >
128
129
}
129
- @ removeSong (song, playlistId)
130
130
</div >
131
131
}
132
132
0 commit comments