add: circle stacks
This commit is contained in:
parent
50704d27a9
commit
56cea83933
27 changed files with 419 additions and 107 deletions
|
@ -17,14 +17,27 @@
|
|||
(text "{{ components::avatar(username=stack.owner, selector_type=\"id\") }}"))
|
||||
(span
|
||||
(text "{{ stack.name }}")))
|
||||
(text "{% if user and user.id == stack.owner -%}")
|
||||
(a
|
||||
("href" "/stacks/{{ stack.id }}/manage")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"pencil\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.manage\" }}")))
|
||||
(text "{%- endif %}"))
|
||||
(div
|
||||
("class" "flex gap-2")
|
||||
(text "{% if stack.mode == 'Circle' -%}")
|
||||
; post button for circle stacks
|
||||
(a
|
||||
("href" "/communities/intents/post?stack={{ stack.id }}")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"plus\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.post\" }}")))
|
||||
(text "{%- endif %}")
|
||||
|
||||
(text "{% if user and user.id == stack.owner -%}")
|
||||
; manage button for stack owner only
|
||||
(a
|
||||
("href" "/stacks/{{ stack.id }}/manage")
|
||||
("class" "button lowered small")
|
||||
(text "{{ icon \"pencil\" }}")
|
||||
(span
|
||||
(text "{{ text \"general:action.manage\" }}")))
|
||||
(text "{%- endif %}")))
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% if list|length == 0 -%}")
|
||||
|
@ -37,6 +50,7 @@
|
|||
(text "{%- endif %}")
|
||||
|
||||
(text "{% if stack.mode == 'BlockList' -%}")
|
||||
; block button + user list for blocklist only
|
||||
(text "{% if not is_blocked -%}")
|
||||
(button
|
||||
("onclick" "block_all()")
|
||||
|
@ -50,6 +64,12 @@
|
|||
("class" "flex gap-2 flex-wrap w-full")
|
||||
(text "{% for user in list %} {{ components::user_plate(user=user, secondary=true) }} {% endfor %}"))
|
||||
(text "{% else %}")
|
||||
; user icons for circle stack
|
||||
(text "{% if stack.mode == 'Circle' -%} {% for user in stack.users %}")
|
||||
(text "{{ components::avatar(username=user, selector_type=\"id\", size=\"24px\") }}")
|
||||
(text "{% endfor %} {%- endif %}")
|
||||
|
||||
; posts for all stacks except blocklist
|
||||
(text "{% for post in list %}
|
||||
{% if post[2].read_access == \"Everybody\" -%}
|
||||
{% if post[0].context.repost and post[0].context.repost.reposting -%}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue