mdi-alert-circle-outline
This comment is targeting other resources.
@@ -62,6 +62,7 @@
>
null }
},
apollo: {
+ stream: {
+ query: gql`
+ query($streamId: String!) {
+ stream(id: $streamId){
+ id
+ role
+ }
+ }
+ `,
+ variables() {
+ return { streamId: this.$route.params.streamId }
+ }
+ },
replyQuery: {
query: gql`
query($streamId: String!, $id: String!) {
@@ -204,6 +218,11 @@ export default {
}
},
computed: {
+ canArchiveThread() {
+ if(!this.comment || !this.stream ) return false
+ if(!this.stream.role) return false
+ if(this.comment.authorId === this.$userId() || this.stream.role ==='stream:owner') return true
+ },
thread() {
let sorted = [...this.localReplies].sort(
(a, b) => new Date(a.createdAt) - new Date(b.createdAt)
diff --git a/packages/frontend/src/main/components/viewer/CommentsOverlay.vue b/packages/frontend/src/main/components/viewer/CommentsOverlay.vue
index 1f1e8596d..857e61e6d 100644
--- a/packages/frontend/src/main/components/viewer/CommentsOverlay.vue
+++ b/packages/frontend/src/main/components/viewer/CommentsOverlay.vue
@@ -206,8 +206,8 @@ export default {
data.commentActivity.expanded = false
data.commentActivity.hovered = false
data.commentActivity.bouncing = false
- if (data.commentActivity.authorId === this.$userId()) {
- data.commentActivity.viewedAt = Date.now()
+ if (data.commentActivity.authorId !== this.$userId()) {
+ data.commentActivity.viewedAt = new Date('1987')
}
this.localComments.push(data.commentActivity)
setTimeout(() => {
diff --git a/packages/frontend/src/main/pages/stream/Comments.vue b/packages/frontend/src/main/pages/stream/Comments.vue
index 3e9f2a195..59d893668 100644
--- a/packages/frontend/src/main/pages/stream/Comments.vue
+++ b/packages/frontend/src/main/pages/stream/Comments.vue
@@ -40,7 +40,7 @@
All this stream's comments are listed below.
-
+
@@ -84,6 +84,7 @@ export default {
stream(id: $id) {
id
name
+ role
}
}
`,
@@ -136,6 +137,11 @@ export default {
}
},
methods: {
+ handleDeletion( comment ){
+ let indx = this.localComments.findIndex(lc => lc.id === comment.id)
+ this.localComments.splice(indx, 1)
+
+ },
async infiniteHandler($state) {
let res = await this.$apollo.queries.comments.refetch({
cursor: this.cursor ? this.cursor : null,