Add continuation for thread reply level (#9821)

I think this will solve the continuation issue in threads where the reply level reaches 12 deep in the conversation thread, without getting to indent depth 5.

Co-authored-by: Kaity A <kaity@theallans.com.au>
Co-authored-by: Kaity A <supakaity@blahaj.zone>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9821
Co-authored-by: Kaity A <supakaity@noreply.codeberg.org>
Co-committed-by: Kaity A <supakaity@noreply.codeberg.org>
This commit is contained in:
Kaity A 2023-04-15 21:56:17 +00:00 committed by Kainoa Kanter
parent 0a3259993b
commit 011b482e98

View File

@ -142,27 +142,31 @@
</div> </div>
</div> </div>
<template v-if="conversation"> <template v-if="conversation">
<template v-if="replies.length == 1"> <template v-if="replyLevel < 11 && depth < 5">
<MkNoteSub <template v-if="replies.length == 1">
v-for="reply in replies" <MkNoteSub
:key="reply.id" v-for="reply in replies"
:note="reply" :key="reply.id"
class="reply single" :note="reply"
:conversation="conversation" class="reply single"
:depth="depth" :conversation="conversation"
:parentId="appearNote.replyId" :depth="depth"
/> :replyLevel="replyLevel + 1"
</template> :parentId="appearNote.replyId"
<template v-else-if="depth < 5"> />
<MkNoteSub </template>
v-for="reply in replies" <template v-else>
:key="reply.id" <MkNoteSub
:note="reply" v-for="reply in replies"
class="reply" :key="reply.id"
:conversation="conversation" :note="reply"
:depth="depth + 1" class="reply"
:parentId="appearNote.replyId" :conversation="conversation"
/> :depth="depth + 1"
:replyLevel="replyLevel + 1"
:parentId="appearNote.replyId"
/>
</template>
</template> </template>
<div v-else-if="replies.length > 0" class="more"> <div v-else-if="replies.length > 0" class="more">
<div class="line"></div> <div class="line"></div>
@ -206,9 +210,12 @@ const props = withDefaults(
// how many notes are in between this one and the note being viewed in detail // how many notes are in between this one and the note being viewed in detail
depth?: number; depth?: number;
// the actual reply level of this note within the conversation thread
replyLevel?: number;
}>(), }>(),
{ {
depth: 1, depth: 1,
replyLevel: 1,
} }
); );