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
|
@ -31,12 +31,11 @@
|
|||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
("ui_ident" "io_data_load")
|
||||
(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 %}")
|
||||
(div ("ui_ident" "io_data_marker"))))
|
||||
|
||||
(script
|
||||
(text "setTimeout(() => {
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?tl=AllPosts&page=\", Number.parseInt(\"{{ page }}\")]);
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?tl=AllPosts&page=\", Number.parseInt(\"{{ page }}\") - 1]);
|
||||
});"))
|
||||
|
||||
(text "{% endblock %}")
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
("ui_ident" "io_data_load")
|
||||
(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 %}")
|
||||
(div ("ui_ident" "io_data_marker"))))
|
||||
|
||||
(script
|
||||
(text "setTimeout(() => {
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?tl=FollowingPosts&page=\", Number.parseInt(\"{{ page }}\")]);
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?tl=FollowingPosts&page=\", Number.parseInt(\"{{ page }}\") - 1]);
|
||||
});"))
|
||||
|
||||
(text "{% endblock %}")
|
||||
|
|
|
@ -28,13 +28,12 @@
|
|||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
("ui_ident" "io_data_load")
|
||||
(text "{% for post in list %} {% 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 %} {% endfor %}")
|
||||
(div ("ui_ident" "io_data_marker")))
|
||||
(text "{%- endif %}"))
|
||||
|
||||
(script
|
||||
(text "setTimeout(() => {
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?tl=MyCommunities&page=\", Number.parseInt(\"{{ page }}\")]);
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?tl=MyCommunities&page=\", Number.parseInt(\"{{ page }}\") - 1]);
|
||||
});"))
|
||||
|
||||
(text "{% endblock %}")
|
||||
|
|
|
@ -9,12 +9,11 @@
|
|||
(div
|
||||
("class" "card w-full flex flex-col gap-2")
|
||||
("ui_ident" "io_data_load")
|
||||
(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 %}")
|
||||
(div ("ui_ident" "io_data_marker"))))
|
||||
|
||||
(script
|
||||
(text "setTimeout(() => {
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?tl=PopularPosts&page=\", Number.parseInt(\"{{ page }}\")]);
|
||||
trigger(\"ui::io_data_load\", [\"/_swiss_army_timeline?tl=PopularPosts&page=\", Number.parseInt(\"{{ page }}\") - 1]);
|
||||
});"))
|
||||
|
||||
(text "{% endblock %}")
|
||||
|
|
|
@ -20,10 +20,13 @@
|
|||
("class" "flex items-center gap-2")
|
||||
(text "{{ icon \"shell\" }}")
|
||||
(span
|
||||
(text "That's a wrap!<!-- observer_disconnect_{{ random_cache_breaker }} -->")))
|
||||
(str (text "general:label.timeline_end"))
|
||||
(text "<!-- observer_disconnect_{{ random_cache_breaker }} -->")))
|
||||
(text "{% if page > 0 -%}")
|
||||
(a
|
||||
("class" "button")
|
||||
("href" "?page=0")
|
||||
(icon (text "arrow-up"))
|
||||
(str (text "chats:label.go_back"))))
|
||||
(str (text "chats:label.go_back")))
|
||||
(text "{%- endif %}"))
|
||||
(text "{%- endif %}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue