Implement showing quotes
This commit is contained in:
parent
c9d07c6202
commit
1c20487494
@ -401,6 +401,9 @@ const Status = {
|
||||
},
|
||||
editingAvailable () {
|
||||
return this.$store.state.instance.editingAvailable
|
||||
},
|
||||
quotedStatus () {
|
||||
return this.status.quote_id ? this.$store.state.statuses.allStatusesObject[this.status.quote_id] : undefined
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -422,4 +422,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.quoted-status {
|
||||
margin-top: 0.5em;
|
||||
border: 1px solid var(--border, $fallback--border);
|
||||
border-radius: var(--attachmentRadius, $fallback--attachmentRadius);
|
||||
}
|
||||
}
|
||||
|
@ -364,6 +364,15 @@
|
||||
@parseReady="setHeadTailLinks"
|
||||
/>
|
||||
|
||||
<article
|
||||
v-if="quotedStatus"
|
||||
class="quoted-status"
|
||||
>
|
||||
<Status
|
||||
:statusoid="quotedStatus"
|
||||
/>
|
||||
</article>
|
||||
|
||||
<div
|
||||
v-if="inConversation && !isPreview && replies && replies.length"
|
||||
class="replies"
|
||||
|
@ -229,6 +229,10 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
||||
timelineObject.newStatusCount += 1
|
||||
}
|
||||
|
||||
if (status.quote) {
|
||||
addStatus(status.quote, /* showImmediately = */ false, /* addToTimeline = */ false)
|
||||
}
|
||||
|
||||
return status
|
||||
}
|
||||
|
||||
|
@ -325,6 +325,10 @@ export const parseStatus = (data) => {
|
||||
output.thread_muted = pleroma.thread_muted
|
||||
output.emoji_reactions = pleroma.emoji_reactions
|
||||
output.parent_visible = pleroma.parent_visible === undefined ? true : pleroma.parent_visible
|
||||
output.quote = pleroma.quote ? parseStatus(pleroma.quote) : undefined
|
||||
output.quote_id = output.quote ? output.quote.id : undefined
|
||||
output.quote_url = pleroma.quote_url
|
||||
output.quote_visible = pleroma.quote_visible
|
||||
} else {
|
||||
output.text = data.content
|
||||
output.summary = data.spoiler_text
|
||||
|
Loading…
Reference in New Issue
Block a user