mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: ✨ Add threaded view to Notes
This commit is contained in:
parent
4c3b637197
commit
e578fa3318
4 changed files with 70 additions and 32 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" :element="note" />
|
||||
<Note v-for="note of context?.ancestors" :render-replies="false" :thread-view="true" :borders="false" :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" :element="note" />
|
||||
<Note class="!rounded-none border-2 -m-[2px] border-primary-500" v-if="note" :render-replies="false":element="note" />
|
||||
</div>
|
||||
<Note v-for="note of context?.descendants" :element="note" />
|
||||
<Note v-for="note of context?.descendants" :element="note" :render-replies="false" :thread-view="note.id !== context?.descendants.at(-1)?.id" :borders="false" :thread-view-top="true" />
|
||||
</div>
|
||||
<div v-else class="mx-auto max-w-2xl w-full overflow-y-auto">
|
||||
<Note v-for="_ of 5" :skeleton="true" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue