summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2023-03-31 11:30:27 +0200
committerjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2023-04-03 10:43:57 +0200
commit8b945d8864d0eabc91eb99d92262a6fe3515e4ef (patch)
tree0b594c6b8953d42aabc4cfee2f60513a5647f407 /apps
parent5da480a9b8cd50876fc48b7c42559af2d7d45760 (diff)
downloadnextcloud-server-8b945d8864d0eabc91eb99d92262a6fe3515e4ef.tar.gz
nextcloud-server-8b945d8864d0eabc91eb99d92262a6fe3515e4ef.zip
Create semantic list for comments in comments tab
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/comments/src/components/Comment.vue10
-rw-r--r--apps/comments/src/views/Comments.vue25
2 files changed, 21 insertions, 14 deletions
diff --git a/apps/comments/src/components/Comment.vue b/apps/comments/src/components/Comment.vue
index 0c9a8b1e418..5c58ec8b1fd 100644
--- a/apps/comments/src/components/Comment.vue
+++ b/apps/comments/src/components/Comment.vue
@@ -20,7 +20,8 @@
-
-->
<template>
- <div v-show="!deleted"
+ <component :is="tag"
+ v-show="!deleted"
:class="{'comment--loading': loading}"
class="comment">
<!-- Comment header toolbar -->
@@ -97,7 +98,7 @@
@click="onExpand"
v-html="renderedContent" />
</div>
- </div>
+ </component>
</template>
<script>
@@ -162,6 +163,11 @@ export default {
type: Function,
required: true,
},
+
+ tag: {
+ type: String,
+ default: 'div',
+ },
},
data() {
diff --git a/apps/comments/src/views/Comments.vue b/apps/comments/src/views/Comments.vue
index 855c9b2d4fa..b3b75a92dca 100644
--- a/apps/comments/src/views/Comments.vue
+++ b/apps/comments/src/views/Comments.vue
@@ -40,18 +40,19 @@
<MessageReplyTextIcon />
</template>
</NcEmptyContent>
-
- <!-- Comments -->
- <Comment v-for="comment in comments"
- v-else
- :key="comment.props.id"
- v-bind="comment.props"
- :auto-complete="autoComplete"
- :message.sync="comment.props.message"
- :ressource-id="ressourceId"
- :user-data="genMentionsData(comment.props.mentions)"
- class="comments__list"
- @delete="onDelete" />
+ <ul v-else>
+ <!-- Comments -->
+ <Comment v-for="comment in comments"
+ :key="comment.props.id"
+ tag="li"
+ v-bind="comment.props"
+ :auto-complete="autoComplete"
+ :message.sync="comment.props.message"
+ :ressource-id="ressourceId"
+ :user-data="genMentionsData(comment.props.mentions)"
+ class="comments__list"
+ @delete="onDelete" />
+ </ul>
<!-- Loading more message -->
<div v-if="loading && !isFirstLoading" class="comments__info icon-loading" />