akkoma-fe/src/components/mentions_line/mentions_line.vue

42 lines
1.1 KiB
Vue
Raw Normal View History

<template>
2021-06-08 11:51:42 +00:00
<span class="MentionsLine">
<MentionLink
v-for="mention in mentionsComputed"
:key="mention.index"
2021-06-08 11:51:42 +00:00
class="mention-link"
:content="mention.content"
:url="mention.url"
2021-06-08 11:51:42 +00:00
/><span
v-if="manyMentions"
class="extraMentions"
>
2021-06-08 11:51:42 +00:00
<span
v-if="expanded"
class="fullExtraMentions"
>
<MentionLink
v-for="mention in extraMentions"
:key="mention.index"
2021-06-08 11:51:42 +00:00
class="mention-link"
:content="mention.content"
:url="mention.url"
2021-06-08 11:51:42 +00:00
/>
</span><button
v-if="!expanded"
class="button-unstyled showMoreLess"
2021-06-08 11:51:42 +00:00
@click="toggleShowMore"
>
{{ $t('status.plus_more', { number: extraMentions.length }) }}
</button><button
v-if="expanded"
class="button-unstyled showMoreLess"
2021-06-08 11:51:42 +00:00
@click="toggleShowMore"
>
{{ $t('general.show_less') }}
</button>
</span>
</span>
</template>
<script src="./mentions_line.js" ></script>
<style lang="scss" src="./mentions_line.scss" />