add: expand infinite scrolling to stacks and profiles
This commit is contained in:
parent
2b253c811c
commit
3027b679db
16 changed files with 226 additions and 288 deletions
|
@ -40,9 +40,9 @@
|
|||
(text "{%- endif %}")))
|
||||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
(text "{% if list|length == 0 -%}")
|
||||
(text "{% if stack.users|length == 0 -%}")
|
||||
(p
|
||||
(text "No items yet! Maybe ")
|
||||
(text "No users included yet! Maybe ")
|
||||
(a
|
||||
("href" "/stacks/{{ stack.id }}/manage#/users")
|
||||
(text "add a user to this stack"))
|
||||
|
@ -63,6 +63,7 @@
|
|||
(div
|
||||
("class" "flex gap-2 flex-wrap w-full")
|
||||
(text "{% for user in list %} {{ components::user_plate(user=user, secondary=true) }} {% endfor %}"))
|
||||
(text "{{ components::pagination(page=page, items=list|length) }}")
|
||||
(text "{% else %}")
|
||||
; user icons for circle stack
|
||||
(text "{% if stack.mode == 'Circle' -%}")
|
||||
|
@ -77,14 +78,16 @@
|
|||
(text "{%- 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 -%}
|
||||
{{ components::repost(repost=post[3], post=post[0], owner=post[1], secondary=true, community=post[2], show_community=true) }}
|
||||
{% else %}
|
||||
{{ components::post(post=post[0], owner=post[1], question=post[4], secondary=true, community=post[2], poll=post[5]) }}
|
||||
{%- endif %} {%- endif %} {% endfor %}")
|
||||
(text "{%- endif %} {{ components::pagination(page=page, items=list|length) }}"))))
|
||||
(div
|
||||
("class" "w-full flex flex-col gap-2")
|
||||
("ui_ident" "io_data_load")
|
||||
(div ("ui_ident" "io_data_marker")))
|
||||
|
||||
(script
|
||||
(text "setTimeout(() => {
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?stack_id={{ stack.id }}&page=\", Number.parseInt(\"{{ page }}\") - 1]);
|
||||
});"))
|
||||
(text "{%- endif %}"))))
|
||||
|
||||
(script
|
||||
(text "async function block_all(block = true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue