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-02-11 13:06:12 +00:00
|
|
|
/><!-- eslint-enable vue/no-v-html --><span
|
2021-06-07 13:37:12 +00:00
|
|
|
v-if="user"
|
|
|
|
class="new"
|
|
|
|
:style="style"
|
2021-06-08 08:38:44 +00:00
|
|
|
:class="classnames"
|
2021-06-07 13:37:12 +00:00
|
|
|
>
|
2021-08-23 17:57:21 +00:00
|
|
|
<a
|
2021-08-11 23:49:37 +00:00
|
|
|
class="short button-unstyled"
|
2022-01-10 06:37:20 +00:00
|
|
|
:class="{ '-with-tooltip': shouldShowTooltip }"
|
2021-08-23 17:57:21 +00:00
|
|
|
:href="url"
|
2021-06-07 13:37:12 +00:00
|
|
|
@click.prevent="onClick"
|
|
|
|
>
|
2022-01-10 07:10:42 +00:00
|
|
|
<!-- eslint-disable vue/no-v-html -->
|
2022-01-10 07:05:41 +00:00
|
|
|
<UserAvatar
|
|
|
|
v-if="shouldShowAvatar"
|
|
|
|
class="mention-avatar"
|
|
|
|
:user="user"
|
2022-01-10 07:10:42 +00:00
|
|
|
/><span
|
2022-01-10 06:37:20 +00:00
|
|
|
class="shortName"
|
|
|
|
><FAIcon
|
2022-01-10 05:37:39 +00:00
|
|
|
v-if="useAtIcon"
|
2021-06-11 08:49:32 +00:00
|
|
|
size="sm"
|
2021-06-10 10:29:59 +00:00
|
|
|
icon="at"
|
|
|
|
class="at"
|
2022-01-10 06:37:20 +00:00
|
|
|
/>{{ !useAtIcon ? '@' : '' }}<span
|
2022-01-10 06:16:33 +00:00
|
|
|
class="userName"
|
|
|
|
v-html="userName"
|
|
|
|
/><span
|
|
|
|
v-if="shouldShowFullUserName"
|
|
|
|
class="serverName"
|
2022-01-10 07:31:26 +00:00
|
|
|
:class="{ '-faded': shouldFadeDomain }"
|
2022-01-10 06:16:33 +00:00
|
|
|
v-html="'@' + serverName"
|
2022-03-27 11:10:45 +00:00
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
<span
|
2022-02-03 20:34:57 +00:00
|
|
|
v-if="isYou && shouldShowYous"
|
|
|
|
:class="{ '-you': shouldBoldenYou }"
|
2022-03-27 11:10:45 +00:00
|
|
|
> {{ ' ' + $t('status.you') }}</span>
|
2021-06-07 13:37:12 +00:00
|
|
|
<!-- eslint-enable vue/no-v-html -->
|
2022-02-09 21:34:06 +00:00
|
|
|
</a><span
|
2022-01-10 06:16:33 +00:00
|
|
|
v-if="shouldShowTooltip"
|
2021-06-07 20:42:04 +00:00
|
|
|
class="full popover-default"
|
|
|
|
:class="[highlightType]"
|
2021-06-07 13:37:12 +00:00
|
|
|
>
|
2021-06-08 11:51:42 +00:00
|
|
|
<span
|
|
|
|
class="userNameFull"
|
2022-01-10 07:31:26 +00:00
|
|
|
>
|
|
|
|
<!-- eslint-disable vue/no-v-html -->
|
|
|
|
@<span
|
|
|
|
class="userName"
|
|
|
|
v-html="userName"
|
|
|
|
/><span
|
|
|
|
class="serverName"
|
|
|
|
:class="{ '-faded': shouldFadeDomain }"
|
|
|
|
v-html="'@' + serverName"
|
|
|
|
/>
|
|
|
|
<!-- eslint-enable vue/no-v-html -->
|
|
|
|
</span>
|
2021-06-07 13:16:10 +00:00
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./mention_link.js"/>
|
|
|
|
|
|
|
|
<style lang="scss" src="./mention_link.scss"/>
|