2021-06-07 13:16:10 +00:00
|
|
|
<template>
|
2021-06-08 11:51:42 +00:00
|
|
|
<span
|
|
|
|
class="MentionLink"
|
|
|
|
>
|
2021-06-07 13:37:12 +00:00
|
|
|
<!-- eslint-disable vue/no-v-html -->
|
|
|
|
<a
|
|
|
|
v-if="!user"
|
2021-06-22 17:16:26 +00:00
|
|
|
:href="url"
|
2021-06-07 13:37:12 +00:00
|
|
|
class="original"
|
2021-06-22 17:16:26 +00:00
|
|
|
target="_blank"
|
2021-06-07 13:37:12 +00:00
|
|
|
v-html="content"
|
2022-06-12 13:31:56 +00:00
|
|
|
/><!-- eslint-enable vue/no-v-html -->
|
2022-06-16 13:30:05 +00:00
|
|
|
<UserPopover
|
|
|
|
v-else
|
2022-07-31 09:35:48 +00:00
|
|
|
:user-id="user.id"
|
2022-06-12 13:31:56 +00:00
|
|
|
:disabled="!shouldShowTooltip"
|
2021-06-07 13:37:12 +00:00
|
|
|
>
|
2022-06-16 13:30:05 +00:00
|
|
|
<span
|
|
|
|
v-if="user"
|
|
|
|
class="new"
|
|
|
|
:style="style"
|
|
|
|
:class="classnames"
|
|
|
|
>
|
|
|
|
<a
|
2024-02-07 13:53:49 +00:00
|
|
|
class="short"
|
2022-06-16 13:30:05 +00:00
|
|
|
:class="{ '-with-tooltip': shouldShowTooltip }"
|
|
|
|
:href="url"
|
|
|
|
@click.prevent="onClick"
|
2022-01-10 07:31:26 +00:00
|
|
|
>
|
2022-06-16 13:30:05 +00:00
|
|
|
<!-- eslint-disable vue/no-v-html -->
|
|
|
|
<UserAvatar
|
|
|
|
v-if="shouldShowAvatar"
|
|
|
|
class="mention-avatar"
|
|
|
|
:user="user"
|
|
|
|
/><span
|
|
|
|
class="shortName"
|
|
|
|
><FAIcon
|
|
|
|
v-if="useAtIcon"
|
|
|
|
size="sm"
|
|
|
|
icon="at"
|
|
|
|
class="at"
|
|
|
|
/>{{ !useAtIcon ? '@' : '' }}<span
|
|
|
|
class="userName"
|
|
|
|
v-html="userName"
|
|
|
|
/><span
|
|
|
|
v-if="shouldShowFullUserName"
|
|
|
|
class="serverName"
|
|
|
|
:class="{ '-faded': shouldFadeDomain }"
|
|
|
|
v-html="'@' + serverName"
|
2022-08-29 22:46:41 +00:00
|
|
|
/><UnicodeDomainIndicator
|
|
|
|
v-if="shouldShowFullUserName"
|
|
|
|
:user="user"
|
2022-06-16 13:30:05 +00:00
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
v-if="isYou && shouldShowYous"
|
|
|
|
:class="{ '-you': shouldBoldenYou }"
|
|
|
|
> {{ ' ' + $t('status.you') }}</span>
|
|
|
|
<!-- eslint-enable vue/no-v-html -->
|
2022-07-31 09:35:48 +00:00
|
|
|
</a><span
|
|
|
|
ref="full"
|
|
|
|
class="full"
|
|
|
|
>
|
|
|
|
<!-- eslint-disable vue/no-v-html -->
|
|
|
|
@<span v-html="userName" /><span v-html="'@' + serverName" />
|
|
|
|
<!-- eslint-enable vue/no-v-html -->
|
2022-06-16 13:30:05 +00:00
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</UserPopover>
|
2021-06-07 13:16:10 +00:00
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
|
2022-07-31 09:35:48 +00:00
|
|
|
<script src="./mention_link.js" />
|
2021-06-07 13:16:10 +00:00
|
|
|
|
2022-07-31 09:35:48 +00:00
|
|
|
<style lang="scss" src="./mention_link.scss" />
|