Skip to content

Commit e2d542a

Browse files
committed
chore(playlist): adjust spacing
1 parent 9874a14 commit e2d542a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

views/pages/playlist.templ

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ templ playlistHeader(pl entities.Playlist) {
4848
type="button"
4949
title="Play playlist"
5050
onClick={ playSongFromPlaylist(pl.Songs[0].YtId, pl) }
51-
>@icons.PlayPlaylist()
52-
</button>
51+
>
52+
@icons.PlayPlaylist()
53+
</button>
5354
}
5455
</div>
5556
}
@@ -70,7 +71,7 @@ templ playlistContent(pl entities.Playlist) {
7071
@song.Song(
7172
s,
7273
[]string{},
73-
[]templ.Component{songOptionsMobile(s, pl.PublicId)},
74+
[]templ.Component{songOptionsMobile(s), removeSong(s, pl.PublicId)},
7475
playSongFromPlaylist(s.YtId, pl),
7576
false,
7677
)
@@ -96,14 +97,14 @@ templ removeSong(song entities.Song, playlistId string) {
9697
if perm, ok := ctx.Value("playlist-permission").(models.PlaylistPermissions); ok && (perm & models.JoinerPermission) != 0 {
9798
<button
9899
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",
100101
"flex", "items-center", "gap-x-2", "w-full",
101102
}
102103
title={ "Remove " + song.Title + "!" }
103104
type="button"
104105
onClick={ removeSongFromPlaylist(song.YtId, playlistId) }
105106
>
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">
107108
<path d="M11.6129 14.8387V24.5161" stroke="var(--secondary-color)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
108109
<path d="M18.0647 14.8387V24.5161" stroke="var(--secondary-color)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
109110
<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) {
115116
}
116117
}
117118

118-
templ songOptionsMobile(song entities.Song, playlistId string) {
119+
templ songOptionsMobile(song entities.Song) {
119120
<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" }
121122
>
122123
<h3 class={ "text-lg", "font-medium" }>Details and options</h3>
123124
<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) {
126127
} else if song.PlayTimes > 1 {
127128
<p class={ "text-md", "max-w-[200px]", "overflow-hidden", "text-nowrap", "text-ellipsis" }>Played { fmt.Sprint( song.PlayTimes) } times</p>
128129
}
129-
@removeSong(song, playlistId)
130130
</div>
131131
}
132132

0 commit comments

Comments
 (0)