From 8b0e494da9d41886bcd1d0c87f1055b2f47277cd Mon Sep 17 00:00:00 2001 From: Glenn Thompson Date: Fri, 14 Nov 2025 12:40:54 +0300 Subject: [PATCH 1/4] fix: Replace undefined uri-path with radiance:path The previous commit used uri-path() which doesn't exist in Radiance. This caused 'The function ASTEROID::URI-PATH is undefined' errors when trying to authenticate. Changed to use radiance:path() which is the correct Radiance API function for extracting the path component from a URI object. Fixes authentication in both require-authentication and require-role. --- user-management.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user-management.lisp b/user-management.lisp index c7f4737..f27effd 100644 --- a/user-management.lisp +++ b/user-management.lisp @@ -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")) From 355655e8eb4bb045645038df50514a1c84a9df47 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Thu, 13 Nov 2025 22:44:11 +0000 Subject: [PATCH 2/4] fix: styling of audio player on chrome browsers --- static/asteroid.css | 28 ++++++++++++++++++++++++++++ static/asteroid.lass | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/static/asteroid.css b/static/asteroid.css index a914007..1f03f15 100644 --- a/static/asteroid.css +++ b/static/asteroid.css @@ -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; diff --git a/static/asteroid.lass b/static/asteroid.lass index 8afab3b..f828d0f 100644 --- a/static/asteroid.lass +++ b/static/asteroid.lass @@ -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" From 6f3973e86ad51a3cff7e094fbf2653a9afa5aa67 Mon Sep 17 00:00:00 2001 From: Luis Pereira Date: Fri, 14 Nov 2025 22:44:55 +0000 Subject: [PATCH 3/4] fix: invalid login error on template --- auth-routes.lisp | 14 +++++++++----- template/login.ctml | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/auth-routes.lisp b/auth-routes.lisp index 6aa5aec..8810a41 100644 --- a/auth-routes.lisp +++ b/auth-routes.lisp @@ -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;")))) diff --git a/template/login.ctml b/template/login.ctml index 4eb9d49..3dadc34 100644 --- a/template/login.ctml +++ b/template/login.ctml @@ -21,8 +21,8 @@

System Access

-