From d22079cf7392a1ef184d7c03ff7cb680e3e1c99c Mon Sep 17 00:00:00 2001
From: tusooa <tusooa@kazv.moe>
Date: Thu, 13 Jul 2023 00:37:57 -0400
Subject: Handle recursive quotes

---
 src/components/status/status.vue | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

(limited to 'src/components/status/status.vue')

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 58fc0eca..c49a9e7b 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -365,13 +365,43 @@
           />
 
           <article
-            v-if="quotedStatus"
+            v-if="hasVisibleQuote"
             class="quoted-status"
           >
+            <button
+              class="button-unstyled -link display-quoted-status-button"
+              :aria-expanded="shouldDisplayQuote"
+              @click="toggleDisplayQuote"
+            >
+              {{ shouldDisplayQuote ? $t('status.hide_quote') : $t('status.display_quote') }}
+              <FAIcon
+                class="display-quoted-status-button-icon"
+                :icon="shouldDisplayQuote ? 'chevron-up' : 'chevron-down'"
+              />
+            </button>
             <Status
+              v-if="shouldDisplayQuote"
               :statusoid="quotedStatus"
+              :in-quote="true"
             />
           </article>
+          <p
+            v-else-if="hasInvisibleQuote"
+            class="quoted-status -unavailable-prompt"
+          >
+            <i18n-t keypath="status.invisible_quote">
+              <template #link>
+                <bdi>
+                  <a
+                    :href="status.quote_url"
+                    target="_blank"
+                  >
+                    {{ status.quote_url }}
+                  </a>
+                </bdi>
+              </template>
+            </i18n-t>
+          </p>
 
           <div
             v-if="inConversation && !isPreview && replies && replies.length"
-- 
cgit v1.2.3-70-g09d2

