aboutsummaryrefslogtreecommitdiff
path: root/src/components/mentions_line/mentions_line.vue
blob: f375e3b0921f1ca4d872618b83e5396773c0a1d6 (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
<template>
  <span class="MentionsLine">
    <MentionLink
      v-for="mention in mentionsComputed"
      :key="mention.index"
      class="mention-link"
      :content="mention.content"
      :url="mention.url"
      :first-mention="false"
    /><span
      v-if="manyMentions"
      class="extraMentions"
    >
      <span
        v-if="expanded"
        class="fullExtraMentions"
      >
        <MentionLink
          v-for="mention in extraMentions"
          :key="mention.index"
          class="mention-link"
          :content="mention.content"
          :url="mention.url"
          :first-mention="false"
        />
      </span><button
        v-if="!expanded"
        class="button-unstyled showMoreLess"
        @click="toggleShowMore"
      >
        {{ $t('status.plus_more', { number: extraMentions.length }) }}
      </button><button
        v-if="expanded"
        class="button-unstyled showMoreLess"
        @click="toggleShowMore"
      >
        {{ $t('general.show_less') }}
      </button>
    </span>
  </span>
</template>
<script src="./mentions_line.js" ></script>
<style lang="scss" src="./mentions_line.scss" />