yandere_fe/src/components/retweet_button/retweet_button.vue

34 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<div v-if="loggedIn">
<template v-if="visibility !== 'private' && visibility !== 'direct'">
2018-12-18 10:26:14 -08:00
<i :class='classes' class='button-icon retweet-button icon-retweet rt-active' v-on:click.prevent='retweet()' :title="$t('tool_tip.repeat')"></i>
<span v-if='!hidePostStatsLocal && status.repeat_num > 0'>{{status.repeat_num}}</span>
</template>
<template v-else>
2018-12-18 10:26:14 -08:00
<i :class='classes' class='button-icon icon-lock' :title="$t('timeline.no_retweet_hint')"></i>
</template>
</div>
2018-08-09 09:45:52 -07:00
<div v-else-if="!loggedIn">
2018-12-18 10:26:14 -08:00
<i :class='classes' class='button-icon icon-retweet' :title="$t('tool_tip.repeat')"></i>
<span v-if='!hidePostStatsLocal && status.repeat_num > 0'>{{status.repeat_num}}</span>
</div>
</template>
<script src="./retweet_button.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
.rt-active {
2018-04-07 09:30:27 -07:00
cursor: pointer;
animation-duration: 0.6s;
&:hover {
color: $fallback--cGreen;
color: var(--cGreen, $fallback--cGreen);
2018-04-07 09:30:27 -07:00
}
}
.icon-retweet.retweeted {
color: $fallback--cGreen;
color: var(--cGreen, $fallback--cGreen);
}
</style>