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