diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2024-05-22 12:15:57 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2024-05-22 12:15:57 +0000 |
| commit | 3e99006e2ab06d2c8ade2eb20e12b1d2fbbcaac2 (patch) | |
| tree | ec9b7035c45a45f17f973162ba8a514003b39eb5 /src/components/status | |
| parent | e232ba0ec5542020f83ea685b8fb491b23def627 (diff) | |
| parent | 9d2572ffdb384ca4458cd96daf6c11e5d46dd03a (diff) | |
Merge branch 'quotes-count' into 'develop'
Display quotes count on posts and add quotes list page
See merge request pleroma/pleroma-fe!1885
Diffstat (limited to 'src/components/status')
| -rw-r--r-- | src/components/status/status.js | 3 | ||||
| -rw-r--r-- | src/components/status/status.scss | 1 | ||||
| -rw-r--r-- | src/components/status/status.vue | 15 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index a2c16323..85a41a9a 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -373,6 +373,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.scss b/src/components/status/status.scss index dfdc1189..63809ff2 100644 --- a/src/components/status/status.scss +++ b/src/components/status/status.scss @@ -374,6 +374,7 @@ font-weight: bolder; font-size: 1.1em; line-height: 1em; + color: var(--text); } &:hover .stat-title { diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 2a17bb13..61a58cda 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -484,7 +484,7 @@ <transition name="fade"> <div - v-if="!hidePostStats && isFocused && combinedFavsAndRepeatsUsers.length > 0" + v-if="shouldDisplayFavsAndRepeats" class="favs-repeated-users" > <div class="stats"> @@ -512,6 +512,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> |
