All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 6m0s
- Extract shared components (empty-state, delete-btn, sentinel, crud-*, view-toggle, img-or-placeholder, avatar, sumup-settings-form, auth forms, order tables/detail/checkout) - Migrate all Python sx_call() callers to use shared components directly - Remove 55+ thin wrapper defcomps from domain .sx files - Remove trivial passthrough wrappers (blog-header-label, market-card-text, etc) - Unify duplicate auth flows (account + federation) into shared/sx/templates/auth.sx - Unify duplicate order views (cart + orders) into shared/sx/templates/orders.sx - Disable static file caching in dev (SEND_FILE_MAX_AGE_DEFAULT=0) - Add SX response validation and debug headers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
1.5 KiB
Plaintext
30 lines
1.5 KiB
Plaintext
;; Auth page components (device auth — account-specific)
|
|
;; Login and check-email components are shared: see shared/sx/templates/auth.sx
|
|
|
|
(defcomp ~account-device-error (&key error)
|
|
(when error
|
|
(div :class "bg-red-50 border border-red-200 text-red-700 p-3 rounded mb-4"
|
|
error)))
|
|
|
|
(defcomp ~account-device-form (&key error action csrf-token code)
|
|
(div :class "py-8 max-w-md mx-auto"
|
|
(h1 :class "text-2xl font-bold mb-6" "Authorize device")
|
|
(p :class "text-stone-600 mb-4" "Enter the code shown in your terminal to sign in.")
|
|
error
|
|
(form :method "post" :action action :class "space-y-4"
|
|
(input :type "hidden" :name "csrf_token" :value csrf-token)
|
|
(div
|
|
(label :for "code" :class "block text-sm font-medium mb-1" "Device code")
|
|
(input :type "text" :name "code" :id "code" :value code :placeholder "XXXX-XXXX"
|
|
:required true :autofocus true :maxlength "9" :autocomplete "off" :spellcheck "false"
|
|
:class "w-full border border-stone-300 rounded px-3 py-3 text-center text-2xl tracking-widest font-mono uppercase focus:outline-none focus:ring-2 focus:ring-stone-500"))
|
|
(button :type "submit"
|
|
:class "w-full bg-stone-800 text-white py-2 px-4 rounded hover:bg-stone-700 transition"
|
|
"Authorize"))))
|
|
|
|
(defcomp ~account-device-approved ()
|
|
(div :class "py-8 max-w-md mx-auto text-center"
|
|
(h1 :class "text-2xl font-bold mb-4" "Device authorized")
|
|
(p :class "text-stone-600" "You can close this window and return to your terminal.")))
|
|
|