Merge branch 'worktree-sx-loop-cleanup' into macros
# Conflicts: # blog/sx/sx_components.py # federation/sx/profile.sx # federation/sx/sx_components.py # orders/sx/sx_components.py
This commit is contained in:
@@ -90,3 +90,16 @@
|
||||
(url-for "social.actor_timeline_page"
|
||||
:id (get remote-actor "id")
|
||||
:before (get (last items) "before_cursor")))))))
|
||||
|
||||
;; Data-driven activities list (replaces Python loop in render_profile_page)
|
||||
(defcomp ~federation-activities-from-data (&key activities)
|
||||
(if (empty? (or activities (list)))
|
||||
(~federation-activities-empty)
|
||||
(~federation-activities-list
|
||||
:items (<> (map (lambda (a)
|
||||
(~federation-activity-card
|
||||
:activity-type (get a "activity_type")
|
||||
:published (get a "published")
|
||||
:obj-type (when (get a "object_type")
|
||||
(~federation-activity-obj-type :obj-type (get a "object_type")))))
|
||||
activities)))))
|
||||
|
||||
Reference in New Issue
Block a user