22 - @copyright Copyright (c) 2020 John Molakvoæ <[email protected] > 33 -
44 - @author John Molakvoæ <[email protected] > 5+ - @author Richard Steinmetz <[email protected] > 56 -
67 - @license GNU AGPL version 3 or any later version
78 -
3132 @new =" onNewComment" />
3233
3334 <template v-if =" ! isFirstLoading " >
34- <NcEmptyContent v-if =" !hasComments && done" icon =" icon-comment" >
35- {{ t('comments', 'No comments yet, start the conversation!') }}
35+ <NcEmptyContent v-if =" !hasComments && done"
36+ class =" comments__empty"
37+ :title =" t('comments', 'No comments yet, start the conversation!')" >
38+ <template #icon >
39+ <MessageReplyTextIcon />
40+ </template >
3641 </NcEmptyContent >
3742
3843 <!-- Comments -->
5560 </div >
5661
5762 <!-- Error message -->
58- <NcEmptyContent v-else-if =" error" class =" comments__error" icon =" icon-error" >
59- {{ error }}
60- <template #desc >
61- <button icon =" icon-history" @click =" getComments" >
62- {{ t('comments', 'Retry') }}
63- </button >
64- </template >
65- </NcEmptyContent >
63+ <template v-else-if =" error " >
64+ <NcEmptyContent class =" comments__error" :title =" error" >
65+ <template #icon >
66+ <AlertCircleOutlineIcon />
67+ </template >
68+ </NcEmptyContent >
69+ <NcButton class =" comments__retry" @click =" getComments" >
70+ <template #icon >
71+ <RefreshIcon />
72+ </template >
73+ {{ t('comments', 'Retry') }}
74+ </NcButton >
75+ </template >
6676 </template >
6777 </div >
6878</template >
@@ -76,6 +86,10 @@ import VTooltip from 'v-tooltip'
7686import Vue from ' vue'
7787
7888import NcEmptyContent from ' @nextcloud/vue/dist/Components/NcEmptyContent'
89+ import NcButton from ' @nextcloud/vue/dist/Components/NcButton'
90+ import RefreshIcon from ' vue-material-design-icons/Refresh'
91+ import MessageReplyTextIcon from ' vue-material-design-icons/MessageReplyText'
92+ import AlertCircleOutlineIcon from ' vue-material-design-icons/AlertCircleOutline'
7993
8094import Comment from ' ../components/Comment'
8195import getComments , { DEFAULT_LIMIT } from ' ../services/GetComments'
@@ -90,6 +104,10 @@ export default {
90104 // Avatar,
91105 Comment ,
92106 NcEmptyContent,
107+ NcButton,
108+ RefreshIcon,
109+ MessageReplyTextIcon,
110+ AlertCircleOutlineIcon,
93111 },
94112
95113 data () {
@@ -276,8 +294,13 @@ export default {
276294<style lang="scss" scoped>
277295.comments {
278296 // Do not add emptycontent top margin
279- & __error {
280- margin-top : 0 ;
297+ & __empty ,
298+ & __error {
299+ margin-top : 0 !important ;
300+ }
301+
302+ & __retry {
303+ margin : 0 auto ;
281304 }
282305
283306 & __info {
0 commit comments