pass all props to the trigger slot of NcPopover

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
This commit is contained in:
Julien Veyssier 2024-11-18 12:41:46 +01:00
Родитель d6c20a367f
Коммит be8c2f3319
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4141FEE162030638
2 изменённых файлов: 30 добавлений и 21 удалений

Просмотреть файл

@ -34,8 +34,9 @@
</div>
</div>
</div>
<template #trigger>
<slot />
<!-- See https://nextcloud-vue-components.netlify.app/#/Components/NcPopover -->
<template #trigger="{ attrs }">
<slot name="trigger" v-bind="attrs" />
</template>
</NcPopover>
</template>

Просмотреть файл

@ -72,13 +72,16 @@
:shown="showObjectAuthorPopover"
:subject-type="richObject.github_type"
:subject-id="richObject.id">
<a :href="'https://github.com/' + richObject.user.login"
target="_blank"
class="author-link"
@mouseenter="showObjectAuthorPopover = true"
@mouseleave="showObjectAuthorPopover = false">
{{ t('integration_github', 'by {creator}', { creator: richObject.user.login }) }}
</a>
<template #trigger="{ attrs }">
<a v-bind="attrs"
:href="'https://github.com/' + richObject.user.login"
target="_blank"
class="author-link"
@mouseenter="showObjectAuthorPopover = true"
@mouseleave="showObjectAuthorPopover = false">
{{ t('integration_github', 'by {creator}', { creator: richObject.user.login }) }}
</a>
</template>
</UserPopover>
&nbsp;
<span v-tooltip.top="{ content: subTextTooltip }"
@ -112,12 +115,14 @@
:shown="showCommentAvatarPopover"
:subject-type="richObject.github_type"
:subject-id="richObject.id">
<NcAvatar
class="author-avatar"
:is-no-user="true"
:url="commentAuthorAvatarUrl"
@mouseenter.native="showCommentAvatarPopover = true"
@mouseleave.native="showCommentAvatarPopover = false" />
<template #trigger="{ attrs }">
<NcAvatar v-bind="attrs"
class="author-avatar"
:is-no-user="true"
:url="commentAuthorAvatarUrl"
@mouseenter.native="showCommentAvatarPopover = true"
@mouseleave.native="showCommentAvatarPopover = false" />
</template>
</UserPopover>
<span class="comment--content--bubble-tip" />
<span class="comment--content--bubble">
@ -126,12 +131,15 @@
:shown="showCommentAuthorPopover"
:subject-type="richObject.github_type"
:subject-id="richObject.id">
<strong @mouseenter="showCommentAuthorPopover = true"
@mouseleave="showCommentAuthorPopover = false">
<a :href="commentAuthorUrl" target="_blank" class="author-link comment-author-display-name">
{{ richObject.github_comment?.user?.login }}
</a>
</strong>
<template #trigger="{ attrs }">
<strong v-bind="attrs"
@mouseenter="showCommentAuthorPopover = true"
@mouseleave="showCommentAuthorPopover = false">
<a :href="commentAuthorUrl" target="_blank" class="author-link comment-author-display-name">
{{ richObject.github_comment?.user?.login }}
</a>
</strong>
</template>
</UserPopover>
&nbsp;
<span v-tooltip.top="{ content: commentedAtTooltip }"