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> <template>
<div v-if="loggedIn && visibility !== 'private' && visibility !== 'direct'"> <div v-if="loggedIn">
<i :class='classes' class='icon-retweet rt-active' v-on:click.prevent='retweet()'></i> <template v-if="visibility !== 'private' && visibility !== 'direct'">
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span> <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>
<div v-else-if="!loggedIn"> <div v-else-if="!loggedIn">
<i :class='classes' class='icon-retweet'></i> <i :class='classes' class='icon-retweet'></i>

View File

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