summaryrefslogtreecommitdiff
path: root/user.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-10-27 15:12:42 -0500
committerColin Okay <colin@cicadas.surf>2022-10-27 15:12:42 -0500
commitf94d232ffbbb40c67925313dbb8025286035ee06 (patch)
treecaec31ed20300bf1e76cf9f2da9cc4a027e624d4 /user.lisp
parentf0586d83687271525f8d6f0874dbb924ecb7f7c2 (diff)
Rename: user.lisp home.lisp
Diffstat (limited to 'user.lisp')
-rw-r--r--user.lisp56
1 files changed, 0 insertions, 56 deletions
diff --git a/user.lisp b/user.lisp
deleted file mode 100644
index c0ec8a6..0000000
--- a/user.lisp
+++ /dev/null
@@ -1,56 +0,0 @@
-;;;; user.lisp
-
-(in-package :vampire)
-
-;;; CLIENT STATE
-
-(defclass/std user-ctl ()
- ())
-
-
-;;; CLIENT CONTROL
-
-;;; CLIENT UI
-
-(defun create-new-playlist-form (parent &rest args)
- (declare (ignorable args))
- (with-clog-create parent
- (div ()
- (section (:h2 :content "Create New Playlist"))
- (label (:content "Playlist Title:"))
- (form-element (:text :bind pl-title))
- (button (:content "Create" :bind btn)))
- (set-on-click
- btn
- (thunk*
- (new-playlist (session-user parent) :title (value pl-title))
- (reload (location (connection-body parent)))))))
-
-(defun url-to-playlist (pl)
- (format nil "/playlist/~a"
- (key pl)))
-
-(defun create-playlist-listing (parent &rest args)
- (declare (ignorable args))
- (dolist (pl (user-playlists (session-user parent)))
- (let ((url
- (url-to-playlist pl)))
- (with-clog-create parent
- (div ()
- (section (:h4)
- (a (:link url :content (playlist-title pl) :bind pl-link))))
- (set-on-click
- pl-link
- (thunk*
- (setf (url (location (connection-body parent)))
- url)))))))
-
-(defun user-home-page (body)
- (with-clog-create body
- (div ()
- (navigation-header ())
- (p (:content (format nil "Welcome ~a" (user-name (session-user body)))))
- (new-playlist-form ())
- (playlist-listing ()))))
-
-