Implement thread folding/expanding

This commit is contained in:
Tusooa Zhu 2021-08-07 00:33:06 -04:00
parent 0582f19e7c
commit 0f2fd8a352
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
6 changed files with 180 additions and 14 deletions

View file

@ -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: {