Compare commits
5 Commits
96a3ce2b64
...
f498008d2a
| Author | SHA1 | Date |
|---|---|---|
|
|
f498008d2a | |
|
|
8b33968011 | |
|
|
6f3973e86a | |
|
|
355655e8eb | |
|
|
8b0e494da9 |
|
|
@ -719,7 +719,9 @@
|
||||||
(cond
|
(cond
|
||||||
;; Validate passwords match
|
;; Validate passwords match
|
||||||
((not (string= password confirm-password))
|
((not (string= password confirm-password))
|
||||||
(render-template-with-plist "register"
|
(format t "Failed to register new user '~a': passwords do not match.~%" username)
|
||||||
|
(clip:process-to-string
|
||||||
|
(load-template "register")
|
||||||
:title "Asteroid Radio - Register"
|
:title "Asteroid Radio - Register"
|
||||||
:display-error "display: block;"
|
:display-error "display: block;"
|
||||||
:display-success "display: none;"
|
:display-success "display: none;"
|
||||||
|
|
@ -728,7 +730,9 @@
|
||||||
|
|
||||||
;; Check if username already exists
|
;; Check if username already exists
|
||||||
((find-user-by-username username)
|
((find-user-by-username username)
|
||||||
(render-template-with-plist "register"
|
(format t "Failed to register new user '~a': Username already exists.~%" username)
|
||||||
|
(clip:process-to-string
|
||||||
|
(load-template "register")
|
||||||
:title "Asteroid Radio - Register"
|
:title "Asteroid Radio - Register"
|
||||||
:display-error "display: block;"
|
:display-error "display: block;"
|
||||||
:display-success "display: none;"
|
:display-success "display: none;"
|
||||||
|
|
@ -746,14 +750,16 @@
|
||||||
(setf (session:field "user-id") (if (listp user-id) (first user-id) user-id)))))
|
(setf (session:field "user-id") (if (listp user-id) (first user-id) user-id)))))
|
||||||
;; Redirect new users to their profile page
|
;; Redirect new users to their profile page
|
||||||
(radiance:redirect "/asteroid/profile"))
|
(radiance:redirect "/asteroid/profile"))
|
||||||
(render-template-with-plist "register"
|
(clip:process-to-string
|
||||||
|
(load-template "register")
|
||||||
:title "Asteroid Radio - Register"
|
:title "Asteroid Radio - Register"
|
||||||
:display-error "display: block;"
|
:display-error "display: block;"
|
||||||
:display-success "display: none;"
|
:display-success "display: none;"
|
||||||
:error-message "Registration failed. Please try again."
|
:error-message "Registration failed. Please try again."
|
||||||
:success-message ""))))
|
:success-message ""))))
|
||||||
;; Show registration form (no POST data)
|
;; Show registration form (no POST data)
|
||||||
(render-template-with-plist "register"
|
(clip:process-to-string
|
||||||
|
(load-template "register")
|
||||||
:title "Asteroid Radio - Register"
|
:title "Asteroid Radio - Register"
|
||||||
:display-error "display: none;"
|
:display-error "display: none;"
|
||||||
:display-success "display: none;"
|
:display-success "display: none;"
|
||||||
|
|
|
||||||
|
|
@ -33,12 +33,16 @@
|
||||||
(format t "Session error: ~a~%" e)
|
(format t "Session error: ~a~%" e)
|
||||||
"Login successful but session error occurred")))
|
"Login successful but session error occurred")))
|
||||||
;; Login failed - show form with error
|
;; Login failed - show form with error
|
||||||
(render-template-with-plist "login"
|
(progn
|
||||||
:title "Asteroid Radio - Login"
|
(format t "Login unsuccessful for user: ~a~%" username)
|
||||||
:error-message "Invalid username or password"
|
(clip:process-to-string
|
||||||
:display-error "display: block;")))
|
(load-template "login")
|
||||||
|
:title "Asteroid Radio - Login"
|
||||||
|
:error-message "Invalid username or password"
|
||||||
|
:display-error "display: block;"))))
|
||||||
;; Show login form (no POST data)
|
;; Show login form (no POST data)
|
||||||
(render-template-with-plist "login"
|
(clip:process-to-string
|
||||||
|
(load-template "login")
|
||||||
:title "Asteroid Radio - Login"
|
:title "Asteroid Radio - Login"
|
||||||
:error-message ""
|
:error-message ""
|
||||||
:display-error "display: none;"))))
|
:display-error "display: none;"))))
|
||||||
|
|
|
||||||
|
|
@ -270,6 +270,34 @@ body .audio-player{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body audio::-webkit-media-controls-panel{
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
}
|
||||||
|
|
||||||
|
body audio::-webkit-media-controls-current-time-display,
|
||||||
|
body audio::-webkit-media-controls-time-remaining-display{
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
body audio::-webkit-media-controls-enclosure{
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body audio::-webkit-media-controls-mute-button,
|
||||||
|
body audio::-webkit-media-controls-play-button,
|
||||||
|
body audio::-webkit-media-controls-volume-slider,
|
||||||
|
body audio::-webkit-media-controls-timeline,
|
||||||
|
body audio::-webkit-media-controls-toggle-closed-captions-button,
|
||||||
|
body audio::-webkit-media-controls-fullscreen-button,
|
||||||
|
body audio::-webkit-media-controls-timeline,
|
||||||
|
body audio::-webkit-media-controls-overlay-enclosure{
|
||||||
|
-moz-filter: invert(1);
|
||||||
|
-o-filter: invert(1);
|
||||||
|
-webkit-filter: invert(1);
|
||||||
|
-ms-filter: invert(1);
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
|
|
||||||
body .track-art{
|
body .track-art{
|
||||||
font-size: 3em;
|
font-size: 3em;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,34 @@
|
||||||
(.audio-player
|
(.audio-player
|
||||||
:text-align center)
|
:text-align center)
|
||||||
|
|
||||||
|
((:and audio |::-webkit-media-controls-panel|)
|
||||||
|
:background-color "#1a1a1a")
|
||||||
|
|
||||||
|
;; ((:and audio (:or |::-webkit-media-controls-mute-button|
|
||||||
|
;; |::-webkit-media-controls-play-button|
|
||||||
|
;; |::-webkit-media-controls-current-time-display|
|
||||||
|
;; |::-webkit-media-controls-time-remaining-display|
|
||||||
|
;; ))
|
||||||
|
;; :height "20px"
|
||||||
|
;; :line-height "20px")
|
||||||
|
|
||||||
|
((:and audio (:or |::-webkit-media-controls-current-time-display|
|
||||||
|
|::-webkit-media-controls-time-remaining-display|))
|
||||||
|
:color "#fff")
|
||||||
|
|
||||||
|
((:and audio |::-webkit-media-controls-enclosure|)
|
||||||
|
:border-radius 0)
|
||||||
|
|
||||||
|
((:and audio (:or |::-webkit-media-controls-mute-button|
|
||||||
|
|::-webkit-media-controls-play-button|
|
||||||
|
|::-webkit-media-controls-volume-slider|
|
||||||
|
|::-webkit-media-controls-timeline|
|
||||||
|
|::-webkit-media-controls-toggle-closed-captions-button|
|
||||||
|
|::-webkit-media-controls-fullscreen-button|
|
||||||
|
|::-webkit-media-controls-timeline|
|
||||||
|
|::-webkit-media-controls-overlay-enclosure|))
|
||||||
|
:filter "invert(1)")
|
||||||
|
|
||||||
(.track-art
|
(.track-art
|
||||||
:font-size "3em"
|
:font-size "3em"
|
||||||
:margin-right "20px"
|
:margin-right "20px"
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
<div class="auth-form">
|
<div class="auth-form">
|
||||||
<h2>System Access</h2>
|
<h2>System Access</h2>
|
||||||
<div class="message error" data-attr="style" data-attr-value="display-error" style="display: none;">
|
<div class="message error" lquery="(attr :style display-error)" style="display: none;">
|
||||||
<span data-text="error-message">Invalid username or password</span>
|
<span data-text="error-message" lquery="(text error-message)">Invalid username or password</span>
|
||||||
</div>
|
</div>
|
||||||
<form method="post" action="/asteroid/login">
|
<form method="post" action="/asteroid/login">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@
|
||||||
<div class="auth-container">
|
<div class="auth-container">
|
||||||
<div class="auth-form">
|
<div class="auth-form">
|
||||||
<h2>Create Account</h2>
|
<h2>Create Account</h2>
|
||||||
<div class="message error" data-attr="style" data-attr-value="display-error" style="display: none;">
|
<div class="message error" lquery="(attr :style display-error)" style="display: none;">
|
||||||
<span data-text="error-message">Registration failed</span>
|
<span lquery="(text error-message)">Registration failed</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="message success" data-attr="style" data-attr-value="display-success" style="display: none;">
|
<div class="message success" lquery="(attr :style display-success)" style="display: none;">
|
||||||
<span data-text="success-message">Registration successful!</span>
|
<span lquery="(text success-message)">Registration successful!</span>
|
||||||
</div>
|
</div>
|
||||||
<form method="post" action="/asteroid/register">
|
<form method="post" action="/asteroid/register">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@
|
||||||
If :api t, returns JSON error (401). Otherwise redirects to login page.
|
If :api t, returns JSON error (401). Otherwise redirects to login page.
|
||||||
Auto-detects API routes if not specified."
|
Auto-detects API routes if not specified."
|
||||||
(let* ((user-id (session:field "user-id"))
|
(let* ((user-id (session:field "user-id"))
|
||||||
(uri (uri-path (radiance:uri *request*)))
|
(uri (radiance:path (radiance:uri *request*)))
|
||||||
;; Use explicit flag if provided, otherwise auto-detect from URI
|
;; Use explicit flag if provided, otherwise auto-detect from URI
|
||||||
(is-api-request (if api t (search "/api/" uri))))
|
(is-api-request (if api t (search "/api/" uri))))
|
||||||
(format t "Authentication check - User ID: ~a, URI: ~a, Is API: ~a~%"
|
(format t "Authentication check - User ID: ~a, URI: ~a, Is API: ~a~%"
|
||||||
|
|
@ -202,7 +202,7 @@
|
||||||
If :api t, returns JSON error (403). Otherwise redirects to login page.
|
If :api t, returns JSON error (403). Otherwise redirects to login page.
|
||||||
Auto-detects API routes if not specified."
|
Auto-detects API routes if not specified."
|
||||||
(let* ((current-user (get-current-user))
|
(let* ((current-user (get-current-user))
|
||||||
(uri (uri-path (radiance:uri *request*)))
|
(uri (radiance:path (radiance:uri *request*)))
|
||||||
;; Use explicit flag if provided, otherwise auto-detect from URI
|
;; Use explicit flag if provided, otherwise auto-detect from URI
|
||||||
(is-api-request (if api t (search "/api/" uri))))
|
(is-api-request (if api t (search "/api/" uri))))
|
||||||
(format t "Current user for role check: ~a~%" (if current-user "FOUND" "NOT FOUND"))
|
(format t "Current user for role check: ~a~%" (if current-user "FOUND" "NOT FOUND"))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue