mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: ♻️ Rewrite timeline rendering code
This commit is contained in:
parent
091615b04e
commit
d6f36eaecf
24 changed files with 392 additions and 435 deletions
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div v-if="loaded" :defer="true" class="mx-auto max-w-2xl w-full pb-72">
|
||||
<Note v-for="note of context?.ancestors" :note="note" />
|
||||
<Note v-for="note of context?.ancestors" :element="note" />
|
||||
<div ref="element" class="first:rounded-t last:rounded-b overflow-hidden">
|
||||
<Note class="!rounded-none border-2 border-primary-500" v-if="note" :note="note" />
|
||||
<Note class="!rounded-none border-2 border-primary-500" v-if="note" :element="note" />
|
||||
</div>
|
||||
<Note v-for="note of context?.descendants" :note="note" />
|
||||
<Note v-for="note of context?.descendants" :element="note" />
|
||||
</div>
|
||||
<div v-else class="mx-auto max-w-2xl w-full overflow-y-auto">
|
||||
<Note v-for="_ of 5" :skeleton="true" />
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="mx-auto max-w-2xl w-full">
|
||||
<TimelineScroller>
|
||||
<AccountProfile :account="account ?? undefined" />
|
||||
<AccountTimeline :id="accountId" :key="accountId" />
|
||||
<AccountTimeline v-if="accountId" :id="accountId" :key="accountId" />
|
||||
</TimelineScroller>
|
||||
</div>
|
||||
</ErrorBoundary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue