2016-10-30 08:12:35 -07:00
|
|
|
<template>
|
2018-02-01 14:45:29 -08:00
|
|
|
<div v-if="loggedIn">
|
2018-12-18 10:26:14 -08:00
|
|
|
<i :class='classes' class='button-icon favorite-button fav-active' @click.prevent='favorite()' :title="$t('tool_tip.favorite')"/>
|
2018-09-03 16:41:37 -07:00
|
|
|
<span v-if='!hidePostStatsLocal && status.fave_num > 0'>{{status.fave_num}}</span>
|
2018-02-01 14:45:29 -08:00
|
|
|
</div>
|
|
|
|
<div v-else>
|
2018-12-18 10:26:14 -08:00
|
|
|
<i :class='classes' class='button-icon favorite-button' :title="$t('tool_tip.favorite')"/>
|
2018-09-03 16:41:37 -07:00
|
|
|
<span v-if='!hidePostStatsLocal && status.fave_num > 0'>{{status.fave_num}}</span>
|
2016-10-30 08:12:35 -07:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./favorite_button.js" ></script>
|
|
|
|
|
2018-03-31 19:28:20 -07:00
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
|
|
.fav-active {
|
2018-04-07 09:30:27 -07:00
|
|
|
cursor: pointer;
|
|
|
|
animation-duration: 0.6s;
|
2018-03-31 19:28:20 -07:00
|
|
|
|
2018-04-07 09:30:27 -07:00
|
|
|
&:hover {
|
2018-03-31 19:28:20 -07:00
|
|
|
color: $fallback--cOrange;
|
|
|
|
color: var(--cOrange, $fallback--cOrange);
|
2018-04-07 09:30:27 -07:00
|
|
|
}
|
2018-03-31 19:28:20 -07:00
|
|
|
}
|
2017-03-08 20:45:40 -08:00
|
|
|
|
2018-04-07 09:30:27 -07:00
|
|
|
.favorite-button.icon-star {
|
|
|
|
color: $fallback--cOrange;
|
|
|
|
color: var(--cOrange, $fallback--cOrange);
|
|
|
|
}
|
2016-10-30 08:12:35 -07:00
|
|
|
</style>
|