moved mentions into a separate component - MentionLine, added collapsing
of mentions when there's too many of 'em
This commit is contained in:
parent
73127f0e25
commit
2f383c2c01
10 changed files with 151 additions and 28 deletions
42
src/components/mentions_line/mentions_line.vue
Normal file
42
src/components/mentions_line/mentions_line.vue
Normal file
|
@ -0,0 +1,42 @@
|
|||
<template>
|
||||
<span class="MentionsLine">
|
||||
<MentionLink
|
||||
v-for="mention in mentions"
|
||||
class="mention-link"
|
||||
:key="mention.statusnet_profile_url"
|
||||
:content="mention.statusnet_profile_url"
|
||||
:url="mention.statusnet_profile_url"
|
||||
:first-mention="false"
|
||||
/><span v-if="manyMentions" class="extraMentions">
|
||||
<span
|
||||
v-if="expanded"
|
||||
class="fullExtraMentions"
|
||||
>
|
||||
<MentionLink
|
||||
v-for="mention in extraMentions"
|
||||
class="mention-link"
|
||||
:key="mention.statusnet_profile_url"
|
||||
:content="mention.statusnet_profile_url"
|
||||
:url="mention.statusnet_profile_url"
|
||||
:first-mention="false"
|
||||
/>
|
||||
</span><button
|
||||
v-if="!expanded"
|
||||
class="showMoreLess"
|
||||
:class="buttonClasses"
|
||||
@click="toggleShowMore"
|
||||
>
|
||||
{{ $t('status.plus_more', { number: extraMentions.length })}}
|
||||
</button><button
|
||||
v-if="expanded"
|
||||
class="showMoreLess"
|
||||
:class="buttonClasses"
|
||||
@click="toggleShowMore"
|
||||
>
|
||||
{{ $t('general.show_less')}}
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
<script src="./mentions_line.js" ></script>
|
||||
<style lang="scss" src="./mentions_line.scss" />
|
Loading…
Add table
Add a link
Reference in a new issue