Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
f498008d2a
|
|
@ -719,7 +719,9 @@
|
|||
(cond
|
||||
;; Validate passwords match
|
||||
((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"
|
||||
:display-error "display: block;"
|
||||
:display-success "display: none;"
|
||||
|
|
@ -728,7 +730,9 @@
|
|||
|
||||
;; Check if username already exists
|
||||
((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"
|
||||
:display-error "display: block;"
|
||||
:display-success "display: none;"
|
||||
|
|
@ -746,14 +750,16 @@
|
|||
(setf (session:field "user-id") (if (listp user-id) (first user-id) user-id)))))
|
||||
;; Redirect new users to their profile page
|
||||
(radiance:redirect "/asteroid/profile"))
|
||||
(render-template-with-plist "register"
|
||||
(clip:process-to-string
|
||||
(load-template "register")
|
||||
:title "Asteroid Radio - Register"
|
||||
:display-error "display: block;"
|
||||
:display-success "display: none;"
|
||||
:error-message "Registration failed. Please try again."
|
||||
:success-message ""))))
|
||||
;; Show registration form (no POST data)
|
||||
(render-template-with-plist "register"
|
||||
(clip:process-to-string
|
||||
(load-template "register")
|
||||
:title "Asteroid Radio - Register"
|
||||
:display-error "display: none;"
|
||||
:display-success "display: none;"
|
||||
|
|
|
|||
|
|
@ -33,12 +33,16 @@
|
|||
(format t "Session error: ~a~%" e)
|
||||
"Login successful but session error occurred")))
|
||||
;; Login failed - show form with error
|
||||
(render-template-with-plist "login"
|
||||
:title "Asteroid Radio - Login"
|
||||
:error-message "Invalid username or password"
|
||||
:display-error "display: block;")))
|
||||
(progn
|
||||
(format t "Login unsuccessful for user: ~a~%" username)
|
||||
(clip:process-to-string
|
||||
(load-template "login")
|
||||
:title "Asteroid Radio - Login"
|
||||
:error-message "Invalid username or password"
|
||||
:display-error "display: block;"))))
|
||||
;; Show login form (no POST data)
|
||||
(render-template-with-plist "login"
|
||||
(clip:process-to-string
|
||||
(load-template "login")
|
||||
:title "Asteroid Radio - Login"
|
||||
:error-message ""
|
||||
:display-error "display: none;"))))
|
||||
|
|
|
|||
|
|
@ -270,6 +270,34 @@ body .audio-player{
|
|||
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{
|
||||
font-size: 3em;
|
||||
margin-right: 20px;
|
||||
|
|
|
|||
|
|
@ -218,6 +218,34 @@
|
|||
(.audio-player
|
||||
: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
|
||||
:font-size "3em"
|
||||
:margin-right "20px"
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
<div class="auth-container">
|
||||
<div class="auth-form">
|
||||
<h2>System Access</h2>
|
||||
<div class="message error" data-attr="style" data-attr-value="display-error" style="display: none;">
|
||||
<span data-text="error-message">Invalid username or password</span>
|
||||
<div class="message error" lquery="(attr :style display-error)" style="display: none;">
|
||||
<span data-text="error-message" lquery="(text error-message)">Invalid username or password</span>
|
||||
</div>
|
||||
<form method="post" action="/asteroid/login">
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@
|
|||
<div class="auth-container">
|
||||
<div class="auth-form">
|
||||
<h2>Create Account</h2>
|
||||
<div class="message error" data-attr="style" data-attr-value="display-error" style="display: none;">
|
||||
<span data-text="error-message">Registration failed</span>
|
||||
<div class="message error" lquery="(attr :style display-error)" style="display: none;">
|
||||
<span lquery="(text error-message)">Registration failed</span>
|
||||
</div>
|
||||
<div class="message success" data-attr="style" data-attr-value="display-success" style="display: none;">
|
||||
<span data-text="success-message">Registration successful!</span>
|
||||
<div class="message success" lquery="(attr :style display-success)" style="display: none;">
|
||||
<span lquery="(text success-message)">Registration successful!</span>
|
||||
</div>
|
||||
<form method="post" action="/asteroid/register">
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@
|
|||
If :api t, returns JSON error (401). Otherwise redirects to login page.
|
||||
Auto-detects API routes if not specified."
|
||||
(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
|
||||
(is-api-request (if api t (search "/api/" uri))))
|
||||
(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.
|
||||
Auto-detects API routes if not specified."
|
||||
(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
|
||||
(is-api-request (if api t (search "/api/" uri))))
|
||||
(format t "Current user for role check: ~a~%" (if current-user "FOUND" "NOT FOUND"))
|
||||
|
|
|
|||
Loading…
Reference in New Issue