aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--vampire.lisp17
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)