Do not show Renote button when inhibited (#3488)

This commit is contained in:
MeiMei 2018-12-04 03:22:08 +09:00 committed by syuilo
parent ade5055bc3
commit d8698743a1
4 changed files with 24 additions and 6 deletions

View File

@ -68,9 +68,12 @@
<template v-else><fa icon="reply"/></template>
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
</button>
<button class="renoteButton" @click="renote()" :title="$t('renote')">
<fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
</button>
<button v-if="['public', 'home'].includes(appearNote.visibility)" class="renoteButton" @click="renote()" :title="$t('renote')">
<fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
</button>
<button v-else class="inhibitedButton">
<fa icon="ban"/>
</button>
<button class="reactionButton" :class="{ reacted: appearNote.myReaction != null }" @click="react()" ref="reactButton" :title="$t('add-reaction')">
<fa icon="plus"/><p class="count" v-if="appearNote.reactions_count > 0">{{ appearNote.reactions_count }}</p>
</button>
@ -324,6 +327,9 @@ export default Vue.extend({
&.reactionButton:hover
color var(--noteActionsReactionHover)
&.inhibitedButton
cursor not-allowed
> .count
display inline
margin 0 0 0 8px

View File

@ -47,9 +47,12 @@
<template v-else><fa icon="reply"/></template>
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
</button>
<button class="renoteButton" @click="renote()" :title="$t('renote')">
<button v-if="['public', 'home'].includes(appearNote.visibility)" class="renoteButton" @click="renote()" :title="$t('renote')">
<fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
</button>
<button v-else class="inhibitedButton">
<fa icon="ban"/>
</button>
<button class="reactionButton" :class="{ reacted: appearNote.myReaction != null }" @click="react()" ref="reactButton" :title="$t('add-reaction')">
<fa icon="plus"/><p class="count" v-if="appearNote.reactions_count > 0">{{ appearNote.reactions_count }}</p>
</button>
@ -291,6 +294,9 @@ export default Vue.extend({
&.reactionButton:hover
color var(--noteActionsReactionHover)
&.inhibitedButton
cursor not-allowed
> .count
display inline
margin 0 0 0 8px

View File

@ -66,9 +66,12 @@
<template v-else><fa icon="reply"/></template>
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
</button>
<button @click="renote()" title="Renote">
<button v-if="['public', 'home'].includes(appearNote.visibility)" @click="renote()" title="Renote">
<fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
</button>
<button v-else>
<fa icon="ban"/>
</button>
<button :class="{ reacted: appearNote.myReaction != null }" @click="react()" ref="reactButton" :title="$t('title')">
<fa icon="plus"/><p class="count" v-if="appearNote.reactions_count > 0">{{ appearNote.reactions_count }}</p>
</button>

View File

@ -43,9 +43,12 @@
<template v-else><fa icon="reply"/></template>
<p class="count" v-if="appearNote.repliesCount > 0">{{ appearNote.repliesCount }}</p>
</button>
<button @click="renote()" title="Renote">
<button v-if="['public', 'home'].includes(appearNote.visibility)" @click="renote()" title="Renote">
<fa icon="retweet"/><p class="count" v-if="appearNote.renoteCount > 0">{{ appearNote.renoteCount }}</p>
</button>
<button v-else>
<fa icon="ban"/>
</button>
<button :class="{ reacted: appearNote.myReaction != null }" @click="react()" ref="reactButton">
<fa icon="plus"/><p class="count" v-if="appearNote.reactions_count > 0">{{ appearNote.reactions_count }}</p>
</button>