@@ -149,15 +149,15 @@ export default {
149
149
:aria-label="avatarAriaLabel"
150
150
:title="tooltip"
151
151
@click="toggleMenu">
152
- <NcActionLink v-for="(item, key) in menu"
152
+ <component :is="item.ncActionComponent"
153
+ v-for="(item, key) in menu"
153
154
:key="key"
154
- :href="item.href"
155
- :icon="item.icon">
155
+ v-bind="item.ncActionComponentProps">
156
156
<template v-if="item.iconSvg" #icon>
157
157
<NcIconSvgWrapper :svg="item.iconSvg" />
158
158
</template>
159
159
{{ item.text }}
160
- </NcActionLink >
160
+ </component >
161
161
<template v-if="contactsMenuLoading" #icon>
162
162
<NcLoadingIcon />
163
163
</template>
@@ -186,6 +186,8 @@ export default {
186
186
<script>
187
187
import NcActions from '../NcActions/index.js'
188
188
import NcActionLink from '../NcActionLink/index.js'
189
+ import NcActionRouter from '../NcActionRouter/index.js'
190
+ import NcActionText from '../NcActionText/index.js'
189
191
import NcButton from '../NcButton/index.js'
190
192
import NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'
191
193
import NcLoadingIcon from '../NcLoadingIcon/index.js'
@@ -195,6 +197,7 @@ import { getAvatarUrl } from '../../utils/getAvatarUrl.ts'
195
197
import { getUserStatusText } from '../../utils/UserStatus.ts'
196
198
import { userStatus } from '../../mixins/index.js'
197
199
import { t } from '../../l10n.js'
200
+ import { getRoute } from '../../components/NcRichText/autolink.js'
198
201
199
202
import axios from '@nextcloud/axios'
200
203
import DotsHorizontal from 'vue-material-design-icons/DotsHorizontal.vue'
@@ -237,7 +240,6 @@ export default {
237
240
components: {
238
241
DotsHorizontal,
239
242
NcActions,
240
- NcActionLink,
241
243
NcButton,
242
244
NcIconSvgWrapper,
243
245
NcLoadingIcon,
@@ -504,9 +506,18 @@ export default {
504
506
},
505
507
menu() {
506
508
const actions = this.contactsMenuActions.map((item) => {
509
+ const route = getRoute(this.$router, item.hyperlink)
507
510
return {
508
- href: item.hyperlink,
509
- icon: item.icon,
511
+ ncActionComponent: route ? NcActionRouter : NcActionLink,
512
+ ncActionComponentProps: route
513
+ ? {
514
+ to: route,
515
+ icon: item.icon,
516
+ }
517
+ : {
518
+ href: item.hyperlink,
519
+ icon: item.icon,
520
+ },
510
521
text: item.title,
511
522
}
512
523
})
@@ -527,7 +538,8 @@ export default {
527
538
<text x="50%" y="50%" text-anchor="middle" style="dominant-baseline: central; font-size: 85%">${escape(this.userStatus.icon)}</text>
528
539
</svg>`
529
540
return [{
530
- href: '#',
541
+ ncActionComponent: NcActionText,
542
+ ncActionComponentProps: {},
531
543
iconSvg: this.userStatus.icon ? emojiIcon : undefined,
532
544
text: `${this.userStatus.message}`,
533
545
}].concat(actions)
0 commit comments