diff options
author | Grant Shangreaux <grant@unabridgedsoftware.com> | 2022-12-23 23:12:33 -0600 |
---|---|---|
committer | Grant Shangreaux <grant@unabridgedsoftware.com> | 2023-01-07 14:22:47 -0600 |
commit | 560358b47ece88ad5513a5fc5e137a4efaa23f56 (patch) | |
tree | afa1fb888720549fc9d56736f069f437b63a780c /playlist.lisp | |
parent | 77ea815c23a0a10bcb80e878f47705b7210d5d4d (diff) |
Add: initial hookup of playlist download UI elements
Diffstat (limited to 'playlist.lisp')
-rw-r--r-- | playlist.lisp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/playlist.lisp b/playlist.lisp index f676936..f7f0b04 100644 --- a/playlist.lisp +++ b/playlist.lisp @@ -13,7 +13,8 @@ (np-title np-artist np-thumb np-dur np-time np-play :std nil :doc "Now Playing Elements") (pl-title pl-tracks pl-dur - :std nil :doc "Playlist Elements")) + :std nil :doc "Playlist Elements") + (zipped :std nil :doc "Path to the zipped playlist, if it exists.")) (:documentation "Holds the complete state for this session's viewing of a particular playlist.")) (defclass/std track-ctl () @@ -438,11 +439,20 @@ (div (:class "row") (div () + (button (:content "Create Playlist Zip" :bind download)) + (a (:link (zipped ctl) :content "Download" :bind dl-link))) + (div () (new-track-form (pl)) (editor-managment (pl))))) + (set-on-click download (thunk* + (setf (zipped ctl) (zip-playlist pl) + (link dl-link) (zipped ctl) + (display dl-link) "inline"))) + (setf (pl-title ctl) title-elem (pl-dur ctl) dur-elem (display input) "none" + (display dl-link) "none" (display title-elem) "inline") (when (playlist-editors pl) @@ -453,7 +463,7 @@ do (format out "<a href='/user/~a'>~a</a>" (key u) (user-name u)) when more do (princ ", " out))))) - + (when (editorp ctl) (setf (attribute title-elem "title") "Click to edit the title." (text edit-indicator) "(click the title to edit it)") |