mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
expand targeted comment by default
This commit is contained in:
parent
597ca3029f
commit
134cea4e47
@ -69,9 +69,14 @@ import scrollToAnchor from '~/mixins/scrollToAnchor.js'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [scrollToAnchor],
|
mixins: [scrollToAnchor],
|
||||||
data: function() {
|
data() {
|
||||||
|
const anchor = `commentId-${this.comment.id}`
|
||||||
|
const isTarget = this.$route.hash === `#${anchor}`
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isCollapsed: true,
|
anchor,
|
||||||
|
isTarget,
|
||||||
|
isCollapsed: !isTarget,
|
||||||
openEditCommentMenu: false,
|
openEditCommentMenu: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -96,9 +101,6 @@ export default {
|
|||||||
user: 'auth/user',
|
user: 'auth/user',
|
||||||
isModerator: 'auth/isModerator',
|
isModerator: 'auth/isModerator',
|
||||||
}),
|
}),
|
||||||
isTarget() {
|
|
||||||
return this.$route.hash === `#${this.anchor}`
|
|
||||||
},
|
|
||||||
isLongComment() {
|
isLongComment() {
|
||||||
return this.$filters.removeHtml(this.comment.content).length > 180
|
return this.$filters.removeHtml(this.comment.content).length > 180
|
||||||
},
|
},
|
||||||
@ -109,9 +111,6 @@ export default {
|
|||||||
|
|
||||||
return this.comment.content
|
return this.comment.content
|
||||||
},
|
},
|
||||||
anchor() {
|
|
||||||
return `commentId-${this.comment.id}`
|
|
||||||
},
|
|
||||||
displaysComment() {
|
displaysComment() {
|
||||||
return !this.unavailable || this.isModerator
|
return !this.unavailable || this.isModerator
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user