Skip to content

Commit 4fc25ae

Browse files
authored
Merge pull request #45871 from nextcloud/backport/45867/stable29
[stable29] fix(comments): Use proper icon components instead of icon classes to fix dark mode
2 parents b7dc669 + 760774b commit 4fc25ae

File tree

12 files changed

+39
-24
lines changed

12 files changed

+39
-24
lines changed

apps/comments/src/components/Comment.vue

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,27 @@
4040
show if we have a message id and current user is author -->
4141
<NcActions v-if="isOwnComment && id && !loading" class="comment__actions">
4242
<template v-if="!editing">
43-
<NcActionButton :close-after-click="true"
44-
icon="icon-rename"
43+
<NcActionButton close-after-click
4544
@click="onEdit">
45+
<template #icon>
46+
<IconEdit :size="20" />
47+
</template>
4648
{{ t('comments', 'Edit comment') }}
4749
</NcActionButton>
4850
<NcActionSeparator />
49-
<NcActionButton :close-after-click="true"
50-
icon="icon-delete"
51+
<NcActionButton close-after-click
5152
@click="onDeleteWithUndo">
53+
<template #icon>
54+
<IconDelete :size="20" />
55+
</template>
5256
{{ t('comments', 'Delete comment') }}
5357
</NcActionButton>
5458
</template>
5559

56-
<NcActionButton v-else
57-
icon="icon-close"
58-
@click="onEditCancel">
60+
<NcActionButton v-else @click="onEditCancel">
61+
<template #icon>
62+
<IconClose :size="20" />
63+
</template>
5964
{{ t('comments', 'Cancel edit') }}
6065
</NcActionButton>
6166
</NcActions>
@@ -90,8 +95,8 @@
9095
:disabled="isEmptyMessage"
9196
@click="onSubmit">
9297
<template #icon>
93-
<span v-if="loading" class="icon-loading-small" />
94-
<ArrowRight v-else :size="20" />
98+
<NcLoadingIcon v-if="loading" />
99+
<IconArrowRight v-else :size="20" />
95100
</template>
96101
</NcButton>
97102
</div>
@@ -124,8 +129,13 @@ import NcActionSeparator from '@nextcloud/vue/dist/Components/NcActionSeparator.
124129
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
125130
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
126131
import NcDateTime from '@nextcloud/vue/dist/Components/NcDateTime.js'
132+
import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
127133
import RichEditorMixin from '@nextcloud/vue/dist/Mixins/richEditor.js'
128-
import ArrowRight from 'vue-material-design-icons/ArrowRight.vue'
134+
135+
import IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'
136+
import IconClose from 'vue-material-design-icons/Close.vue'
137+
import IconDelete from 'vue-material-design-icons/Delete.vue'
138+
import IconEdit from 'vue-material-design-icons/Pencil.vue'
129139
130140
import CommentMixin from '../mixins/CommentMixin.js'
131141
@@ -136,13 +146,17 @@ export default {
136146
name: 'Comment',
137147
138148
components: {
139-
ArrowRight,
149+
IconArrowRight,
150+
IconClose,
151+
IconDelete,
152+
IconEdit,
140153
NcActionButton,
141154
NcActions,
142155
NcActionSeparator,
143156
NcAvatar,
144157
NcButton,
145158
NcDateTime,
159+
NcLoadingIcon,
146160
NcRichContenteditable,
147161
},
148162
mixins: [RichEditorMixin, CommentMixin],

apps/comments/src/views/ActivityCommentEntry.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
</template>
3535

3636
<script lang="ts">
37+
import type { PropType } from 'vue'
3738
import { translate as t } from '@nextcloud/l10n'
3839
3940
import Comment from '../components/Comment.vue'
@@ -53,7 +54,7 @@ export default {
5354
required: true,
5455
},
5556
reloadCallback: {
56-
type: Function,
57+
type: Function as PropType<() => void>,
5758
required: true,
5859
},
5960
},

dist/1241-1241.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/1241-1241.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/5632-5632.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)