feat: implement infinite scrolling for public entity lists

Add cursor-based pagination to backend list queries
Introduce LoadMoreSentinel for intersection-based loading
Replace manual load more buttons with infinite scroll sentinel
This commit is contained in:
2026-05-06 08:33:08 +08:00
parent 91a001e3f9
commit c821e9ebba
16 changed files with 619 additions and 103 deletions

View File

@@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import LifeRatingControl from '../components/LifeRatingControl.vue';
import LifeReactionUsersModal from '../components/LifeReactionUsersModal.vue';
import LoadMoreSentinel from '../components/LoadMoreSentinel.vue';
import PageHeader from '../components/PageHeader.vue';
import Skeleton from '../components/Skeleton.vue';
import StatusBadge from '../components/StatusBadge.vue';
@@ -1279,17 +1280,7 @@ onUnmounted(() => {
<p v-else class="life-comments__empty">{{ t('pages.life.noComments') }}</p>
<div v-if="commentsHasMore && !commentsLoading" class="life-feed__retry">
<button
class="ui-button ui-button--ghost ui-button--small"
type="button"
:disabled="commentsLoadingMore"
@click="loadComments(false)"
>
<Icon :icon="iconChevronDown" class="ui-icon" aria-hidden="true" />
{{ commentsLoadingMore ? t('common.loading') : t('pages.life.loadMoreComments') }}
</button>
</div>
<LoadMoreSentinel :active="commentsHasMore && !commentsLoading" :disabled="commentsLoadingMore" @load="loadComments(false)" />
</section>
</article>