From 6c4c8fe51f0e2c4ce55f5915a2bc5434aef5e5e7 Mon Sep 17 00:00:00 2001
From: marcin mikołajczak <git@mkljczk.pl>
Date: Thu, 4 Jan 2024 22:46:04 +0100
Subject: Display quotes count on posts and add quotes list page
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
---
 src/components/status/status.vue | 13 +++++++++++++
 1 file changed, 13 insertions(+)

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

diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index fa9d6f0b..11dc1e2e 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -506,6 +506,19 @@
                     </div>
                   </div>
                 </UserListPopover>
+                <router-link
+                  v-if="statusFromGlobalRepository.quotes_count > 0"
+                  :to="{ name: 'quotes', params: { id: status.id } }"
+                >
+                  <div
+                    class="stat-count"
+                  >
+                    <a class="stat-title">{{ $t('status.quotes') }}</a>
+                    <div class="stat-number">
+                      {{ statusFromGlobalRepository.quotes_count }}
+                    </div>
+                  </div>
+                </router-link>
                 <div class="avatar-row">
                   <AvatarList :users="combinedFavsAndRepeatsUsers" />
                 </div>
-- 
cgit v1.2.3-70-g09d2


From f6d3a66a5b7bcbbecc72a66532866ee096c7752d Mon Sep 17 00:00:00 2001
From: marcin mikołajczak <git@mkljczk.pl>
Date: Fri, 19 Jan 2024 19:01:11 +0100
Subject: shouldDisplayFavsAndRepeats
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
---
 src/components/status/status.js  | 3 +++
 src/components/status/status.vue | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

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

diff --git a/src/components/status/status.js b/src/components/status/status.js
index 129929a3..9e6c9528 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -374,6 +374,9 @@ const Status = {
     hidePostStats () {
       return this.mergedConfig.hidePostStats
     },
+    shouldDisplayFavsAndRepeats () {
+      return !this.hidePostStats && this.isFocused && (this.combinedFavsAndRepeatsUsers.length > 0 || this.statusFromGlobalRepository.quotes_count)
+    },
     muteBotStatuses () {
       return this.mergedConfig.muteBotStatuses
     },
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 11dc1e2e..54fcc60f 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -478,7 +478,7 @@
 
           <transition name="fade">
             <div
-              v-if="!hidePostStats && isFocused && combinedFavsAndRepeatsUsers.length > 0"
+              v-if="shouldDisplayFavsAndRepeats"
               class="favs-repeated-users"
             >
               <div class="stats">
-- 
cgit v1.2.3-70-g09d2

