From 1c2048749480800e2d44b3876378beee421a79ba Mon Sep 17 00:00:00 2001 From: tusooa Date: Wed, 12 Jul 2023 20:45:44 -0400 Subject: [PATCH] Implement showing quotes --- src/components/status/status.js | 3 +++ src/components/status/status.scss | 6 ++++++ src/components/status/status.vue | 9 +++++++++ src/modules/statuses.js | 4 ++++ .../entity_normalizer/entity_normalizer.service.js | 4 ++++ 5 files changed, 26 insertions(+) diff --git a/src/components/status/status.js b/src/components/status/status.js index 9a9bca7aa0..c10c6cf5f5 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -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: { diff --git a/src/components/status/status.scss b/src/components/status/status.scss index 448128675b..4dfd1f87e9 100644 --- a/src/components/status/status.scss +++ b/src/components/status/status.scss @@ -422,4 +422,10 @@ } } } + + .quoted-status { + margin-top: 0.5em; + border: 1px solid var(--border, $fallback--border); + border-radius: var(--attachmentRadius, $fallback--attachmentRadius); + } } diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 35b153627a..58fc0ecad6 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -364,6 +364,15 @@ @parseReady="setHeadTailLinks" /> +
+ +
+
{ 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