aboutsummaryrefslogtreecommitdiff
path: root/src/components/mention_link/mention_link.vue
blob: e4d395fa9a1c064f8cc8ec9c4bfee786c2c058b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
  <span
    class="MentionLink"
  >
    <!-- eslint-disable vue/no-v-html -->
    <a
      v-if="!user"
      href="url"
      class="original"
      v-html="content"
    />
    <!-- eslint-enable vue/no-v-html -->
    <span
      v-if="user"
      class="new"
      :style="style"
      :class="classnames"
    >
      <button
        class="short"
        :class="[{ '-sublime': !highlight }, oldStyle ? 'button-unstyled' : 'button-default']"
        @click.prevent="onClick"
      >
        <!-- eslint-disable vue/no-v-html -->
        <FAIcon
          size="sm"
          icon="at"
          class="at"
        /><span class="shortName"><span
          class="userName"
          v-html="userName"
        /></span>
        <span
          v-if="isYou"
          class="you"
        >{{ $t('status.you') }}</span>
        <!-- eslint-enable vue/no-v-html -->
      </button>
      <span
        v-if="userName !== userNameFull"
        class="full popover-default"
        :class="[highlightType]"
      >
        <span
          class="userNameFull"
          v-text="'@' + userNameFull"
        />
      </span>
    </span>
  </span>
</template>

<script src="./mention_link.js"/>

<style lang="scss" src="./mention_link.scss"/>