diff options
author | Colin Okay <colin@cicadas.surf> | 2022-10-25 17:35:47 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-10-25 17:35:47 -0500 |
commit | f537424c3159b24d9c148796fdda0cdaaa5abad2 (patch) | |
tree | c40c4206e40837fe35a504e2e66d571fe4a57255 | |
parent | 60fac3a2d058077aea46fb2ce2fd3e9531728124 (diff) |
Tweaks
-rw-r--r-- | vampire.lisp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/vampire.lisp b/vampire.lisp index 8669da7..5971392 100644 --- a/vampire.lisp +++ b/vampire.lisp @@ -267,10 +267,10 @@ (defun create-track-list-item (parent track) (with-clog-create parent - (div () + (div (:bind view) (p () - (button (:content "⏵" :bind btn)) (span (:content (track-listing-line track))) + (span (:content " -- ")) (span (:content (secs-to-hms (or (track-duration track) 0))))) (audio (:source (media-url-path track) :controls nil :bind audio))) (install-audio-track audio track) @@ -281,7 +281,7 @@ audio (alambda (ctl/next-track audio))) (set-on-click - btn + view (alambda (ctl/play-audio audio))))) @@ -340,11 +340,18 @@ (span (:bind duration-elem))) (button (:bind stop-button :content "⏹")) (button (:bind next-button :content "⏭")) - (button (:bind pause/play-button :content "⏯"))) + (button (:bind pause/play-button :content "⏵"))) (setf (height thumb-elem) 120) (set-on-click stop-button 'ctl/stop) (set-on-click next-button 'ctl/next-track) - (set-on-click pause/play-button 'ctl/toggle-play) + (let ((playingp nil)) + (set-on-click + pause/play-button + (alambda + (setf (text pause/play-button) + (if playingp "⏵" "⏸") + playingp (not playingp)) + (ctl/toggle-play obj)))) (install-track-display thumb-elem title-elem artist-elem time-elem duration-elem))) (defun playlist-page (body) |