1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
<!--
- SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<Comment ref="comment"
tag="li"
v-bind="comment.props"
:auto-complete="autoComplete"
:resource-type="resourceType"
:message="commentMessage"
:resource-id="resourceId"
:user-data="genMentionsData(comment.props.mentions)"
class="comments-activity"
@delete="reloadCallback()" />
</template>
<script lang="ts">
import { translate as t } from '@nextcloud/l10n'
import Comment from '../components/Comment.vue'
import CommentView from '../mixins/CommentView'
export default {
name: 'ActivityCommentEntry',
components: {
Comment,
},
mixins: [CommentView],
props: {
comment: {
type: Object,
required: true,
},
reloadCallback: {
type: Function,
required: true,
},
},
data() {
return {
commentMessage: '',
}
},
watch: {
comment() {
this.commentMessage = this.comment.props.message
},
},
mounted() {
this.commentMessage = this.comment.props.message
},
methods: {
t,
},
}
</script>
<style scoped>
.comments-activity {
padding: 0;
}
</style>
|