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

41 lines
914 B
Vue
Raw Normal View History

2016-10-31 02:12:35 +11:00
<template>
<div v-if="loggedIn">
2019-07-05 17:17:44 +10:00
<i
:class="classes"
class="button-icon favorite-button fav-active"
:title="$t('tool_tip.favorite')"
@click.prevent="favorite()"
/>
<span v-if="!hidePostStatsLocal && status.fave_num > 0">{{ status.fave_num }}</span>
</div>
<div v-else>
2019-07-05 17:17:44 +10:00
<i
:class="classes"
class="button-icon favorite-button"
:title="$t('tool_tip.favorite')"
/>
<span v-if="!hidePostStatsLocal && status.fave_num > 0">{{ status.fave_num }}</span>
2016-10-31 02:12:35 +11:00
</div>
</template>
<script src="./favorite_button.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
.fav-active {
2018-04-08 02:30:27 +10:00
cursor: pointer;
animation-duration: 0.6s;
2018-04-08 02:30:27 +10:00
&:hover {
color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange);
2018-04-08 02:30:27 +10:00
}
}
2018-04-08 02:30:27 +10:00
.favorite-button.icon-star {
color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange);
}
2016-10-31 02:12:35 +11:00
</style>