aboutsummaryrefslogtreecommitdiff
path: root/src/components/conversation/conversation.vue
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2021-08-06 20:18:27 -0400
committerTusooa Zhu <tusooa@kazv.moe>2022-03-07 19:19:29 -0500
commit0582f19e7c2c6f916b427d5ecfbbb571178ce841 (patch)
treea45f9f9a7845867b66c2c2acc74464028d1da6f8 /src/components/conversation/conversation.vue
parent7e1e8ea42925dffbce1d75e463f38a2c051c764d (diff)
Add tree-style thread display
Diffstat (limited to 'src/components/conversation/conversation.vue')
-rw-r--r--src/components/conversation/conversation.vue59
1 files changed, 41 insertions, 18 deletions
diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue
index 3fb26d92..cea5f88f 100644
--- a/src/components/conversation/conversation.vue
+++ b/src/components/conversation/conversation.vue
@@ -18,24 +18,47 @@
{{ $t('timeline.collapse') }}
</button>
</div>
- <status
- v-for="status in conversation"
- :key="status.id"
- ref="statusComponent"
- :inline-expanded="collapsable && isExpanded"
- :statusoid="status"
- :expandable="!isExpanded"
- :show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
- :focused="focused(status.id)"
- :in-conversation="isExpanded"
- :highlight="getHighlight()"
- :replies="getReplies(status.id)"
- :in-profile="inProfile"
- :profile-user-id="profileUserId"
- class="conversation-status status-fadein panel-body"
- @goto="setHighlight"
- @toggleExpanded="toggleExpanded"
- />
+ <div v-if="isTreeView">
+ <thread-tree
+ v-for="status in topLevel"
+ :key="status.id"
+ ref="statusComponent"
+
+ :status="status"
+ :in-profile="inProfile"
+ :conversation="conversation"
+ :collapsable="collapsable"
+ :is-expanded="isExpanded"
+ :pinned-status-ids-object="pinnedStatusIdsObject"
+ :profile-user-id="profileUserId"
+
+ :focused="focused"
+ :get-replies="getReplies"
+ :get-highlight="getHighlight"
+ :set-highlight="setHighlight"
+ :toggle-expanded="toggleExpanded"
+ />
+ </div>
+ <div v-if="isLinearView">
+ <status
+ v-for="status in conversation"
+ :key="status.id"
+ ref="statusComponent"
+ :inline-expanded="collapsable && isExpanded"
+ :statusoid="status"
+ :expandable="!isExpanded"
+ :show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
+ :focused="focused(status.id)"
+ :in-conversation="isExpanded"
+ :highlight="getHighlight()"
+ :replies="getReplies(status.id)"
+ :in-profile="inProfile"
+ :profile-user-id="profileUserId"
+ class="conversation-status status-fadein panel-body"
+ @goto="setHighlight"
+ @toggleExpanded="toggleExpanded"
+ />
+ </div>
</div>
<div
v-else