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>
44 lines
1.6 KiB
Plaintext
44 lines
1.6 KiB
Plaintext
;; Account dashboard components
|
|
|
|
(defcomp ~account-error-banner (&key error)
|
|
(when error
|
|
(div :class "rounded-lg border border-red-200 bg-red-50 text-red-800 px-4 py-3 text-sm"
|
|
error)))
|
|
|
|
(defcomp ~account-user-email (&key email)
|
|
(when email
|
|
(p :class "text-sm text-stone-500 mt-1" email)))
|
|
|
|
(defcomp ~account-user-name (&key name)
|
|
(when name
|
|
(p :class "text-sm text-stone-600" name)))
|
|
|
|
(defcomp ~account-logout-form (&key csrf-token)
|
|
(form :action "/auth/logout/" :method "post"
|
|
(input :type "hidden" :name "csrf_token" :value csrf-token)
|
|
(button :type "submit"
|
|
:class "inline-flex items-center gap-2 rounded-full border border-stone-300 px-4 py-2 text-sm font-medium text-stone-700 hover:bg-stone-50 transition"
|
|
(i :class "fa-solid fa-right-from-bracket text-xs") " Sign out")))
|
|
|
|
(defcomp ~account-label-item (&key name)
|
|
(span :class "inline-flex items-center rounded-full border border-stone-200 px-3 py-1 text-xs font-medium bg-white/60"
|
|
name))
|
|
|
|
(defcomp ~account-labels-section (&key items)
|
|
(when items
|
|
(div
|
|
(h2 :class "text-base font-semibold tracking-tight mb-3" "Labels")
|
|
(div :class "flex flex-wrap gap-2" items))))
|
|
|
|
(defcomp ~account-main-panel (&key error email name logout labels)
|
|
(div :class "w-full max-w-3xl mx-auto px-4 py-6"
|
|
(div :class "bg-white/70 backdrop-blur rounded-2xl shadow border border-stone-200 p-6 sm:p-8 space-y-8"
|
|
error
|
|
(div :class "flex items-center justify-between"
|
|
(div
|
|
(h1 :class "text-xl font-semibold tracking-tight" "Account")
|
|
email
|
|
name)
|
|
logout)
|
|
labels)))
|