aboutsummaryrefslogtreecommitdiff
path: root/src/components/status
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/status')
-rw-r--r--src/components/status/status.js22
-rw-r--r--src/components/status/status.vue13
2 files changed, 32 insertions, 3 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index d8f94926..9d423631 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -35,7 +35,9 @@ import {
faStar,
faEyeSlash,
faEye,
- faThumbtack
+ faThumbtack,
+ faAngleDoubleUp,
+ faAngleDoubleDown
} from '@fortawesome/free-solid-svg-icons'
library.add(
@@ -52,7 +54,9 @@ library.add(
faEllipsisH,
faEyeSlash,
faEye,
- faThumbtack
+ faThumbtack,
+ faAngleDoubleUp,
+ faAngleDoubleDown
)
const Status = {
@@ -89,7 +93,10 @@ const Status = {
'inlineExpanded',
'showPinned',
'inProfile',
- 'profileUserId'
+ 'profileUserId',
+
+ 'controlledThreadDisplayStatus',
+ 'controlledToggleThreadDisplay'
],
data () {
return {
@@ -304,6 +311,12 @@ const Status = {
},
isSuspendable () {
return !this.replying && this.mediaPlaying.length === 0
+ },
+ inThreadForest () {
+ return !!this.controlledThreadDisplayStatus
+ },
+ threadShowing () {
+ return this.controlledThreadDisplayStatus === 'showing'
}
},
methods: {
@@ -353,6 +366,9 @@ const Status = {
},
setHeadTailLinks (headTailLinks) {
this.headTailLinks = headTailLinks
+ },
+ toggleThreadDisplay () {
+ this.controlledToggleThreadDisplay()
}
},
watch: {
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index 3bb29db6..2ebf5638 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -219,6 +219,19 @@
class="fa-scale-110"
/>
</button>
+ <button
+ v-if="inThreadForest && replies && replies.length"
+ class="button-unstyled"
+ :title="threadShowing ? $t('status.thread_hide') : $t('status.thread_show')"
+ :aria-expanded="threadShowing ? 'true' : 'false'"
+ @click.prevent="toggleThreadDisplay"
+ >
+ <FAIcon
+ fixed-width
+ class="fa-scale-110"
+ :icon="threadShowing ? 'angle-double-up' : 'angle-double-down'"
+ />
+ </button>
</span>
</div>
<div