Show lock icon instead of hiding repeat button, tusky-style. Added hint

explaining what's going on. Fixes favorite button jumping left and right
depending on post visibility
This commit is contained in:
Henry Jameson 2018-08-28 13:42:44 +03:00
parent 226849b26e
commit 68d15f665e
2 changed files with 12 additions and 5 deletions

View file

@ -1,7 +1,12 @@
<template>
<div v-if="loggedIn && visibility !== 'private' && visibility !== 'direct'">
<i :class='classes' class='icon-retweet rt-active' v-on:click.prevent='retweet()'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
<div v-if="loggedIn">
<template v-if="visibility !== 'private' && visibility !== 'direct'">
<i :class='classes' class='icon-retweet rt-active' v-on:click.prevent='retweet()'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
</template>
<template v-else>
<i :class='classes' class='icon-lock' :title="$t('timeline.no_retweet_hint')"></i>
</template>
</div>
<div v-else-if="!loggedIn">
<i :class='classes' class='icon-retweet'></i>

View file

@ -273,7 +273,8 @@ const en = {
load_older: 'Load older statuses',
conversation: 'Conversation',
collapse: 'Collapse',
repeated: 'repeated'
repeated: 'repeated',
no_retweet_hint: 'Post is marked as followers-only or direct and cannot be repeated'
},
settings: {
user_settings: 'User Settings',
@ -1620,7 +1621,8 @@ const ru = {
load_older: 'Загрузить старые статусы',
conversation: 'Разговор',
collapse: 'Свернуть',
repeated: 'повторил(а)'
repeated: 'повторил(а)',
no_retweet_hint: 'Пост помечен как "только для подписчиков" или "личное" и поэтому не может быть повторён'
},
settings: {
user_settings: 'Настройки пользователя',