Skip to content

Commit 640a1e1

Browse files
luka-nextcloudmejo-
authored andcommitted
fix: add primary attribute for current user
Signed-off-by: Luka Trovic <[email protected]>
1 parent 9a45c93 commit 640a1e1

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/extensions/Mention.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<template>
22
<NodeViewWrapper as="span" class="mention" contenteditable="false">
3-
<NcUserBubble :user="node.attrs.id" :display-name="username" class="mention-user-bubble">
3+
<NcUserBubble :user="node.attrs.id"
4+
:display-name="username"
5+
:primary="isCurrentUser"
6+
class="mention-user-bubble">
47
@{{ username }}
58
</NcUserBubble>
69
</NodeViewWrapper>
@@ -9,6 +12,7 @@
912
<script>
1013
import NcUserBubble from '@nextcloud/vue/dist/Components/NcUserBubble.js'
1114
import { NodeViewWrapper } from '@tiptap/vue-2'
15+
import { getCurrentUser } from '@nextcloud/auth'
1216
1317
export default {
1418
name: 'Mention',
@@ -32,6 +36,11 @@ export default {
3236
username: this.node.attrs.label,
3337
}
3438
},
39+
computed: {
40+
isCurrentUser() {
41+
return this.node.attrs.id === getCurrentUser().uid
42+
},
43+
},
3544
}
3645
</script>
3746
<style scoped>

0 commit comments

Comments
 (0)