pleroma-fe/src/components/retweet_button/retweet_button.vue

56 lines
1.4 KiB
Vue
Raw Normal View History

<template>
<div v-if="loggedIn">
<template v-if="visibility !== 'private' && visibility !== 'direct'">
2020-10-20 21:31:16 +00:00
<FAIcon
:class="classes"
class="RetweetButton fa-scale-110 fa-old-padding -interactive"
2020-10-20 21:31:16 +00:00
icon="retweet"
:spin="animated"
:title="$t('tool_tip.repeat')"
@click.prevent="retweet()"
/>
<span v-if="!mergedConfig.hidePostStats && status.repeat_num > 0">{{ status.repeat_num }}</span>
</template>
<template v-else>
<FAIcon
2019-07-05 07:17:44 +00:00
:class="classes"
class="RetweetButton fa-scale-110 fa-old-padding"
icon="lock"
2019-07-05 07:17:44 +00:00
:title="$t('timeline.no_retweet_hint')"
/>
</template>
</div>
2018-08-09 16:45:52 +00:00
<div v-else-if="!loggedIn">
<FAIcon
2019-07-05 07:17:44 +00:00
:class="classes"
class="fa-scale-110 fa-old-padding"
icon="retweet"
2019-07-05 07:17:44 +00:00
:title="$t('tool_tip.repeat')"
/>
<span v-if="!mergedConfig.hidePostStats && status.repeat_num > 0">{{ status.repeat_num }}</span>
</div>
</template>
<script src="./retweet_button.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
.RetweetButton {
&.-interactive {
cursor: pointer;
animation-duration: 0.6s;
&:hover {
color: $fallback--cGreen;
color: var(--cGreen, $fallback--cGreen);
}
}
&.-repeated {
color: $fallback--cGreen;
color: var(--cGreen, $fallback--cGreen);
2018-04-07 16:30:27 +00:00
}
}
</style>