Merge branch 'fix/remove-retweet-button-on-private-and-direct-posts' into 'develop'

Do not show retweet button if post is followers-only or a DM

See merge request pleroma/pleroma-fe!303
This commit is contained in:
lambda 2018-08-12 10:32:40 +00:00
commit fba757f595
3 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
const RetweetButton = {
props: ['status', 'loggedIn'],
props: ['status', 'loggedIn', 'visibility'],
data () {
return {
animated: false

View file

@ -1,9 +1,9 @@
<template>
<div v-if="loggedIn">
<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>
<div v-else>
<div v-else-if="!loggedIn">
<i :class='classes' class='icon-retweet'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
</div>

View file

@ -88,7 +88,7 @@
<i class="icon-reply" :class="{'icon-reply-active': replying}"></i>
</a>
</div>
<retweet-button :loggedIn='loggedIn' :status='status'></retweet-button>
<retweet-button :visibility='status.visibility' :loggedIn='loggedIn' :status='status'></retweet-button>
<favorite-button :loggedIn='loggedIn' :status='status'></favorite-button>
<delete-button :status='status'></delete-button>
</div>