2016-10-30 15:12:35 +00:00
|
|
|
<template>
|
2018-02-01 22:45:29 +00:00
|
|
|
<div v-if="loggedIn">
|
2020-10-19 16:38:49 +00:00
|
|
|
<FAIcon
|
2019-07-05 07:17:44 +00:00
|
|
|
:class="classes"
|
2020-10-28 19:31:16 +00:00
|
|
|
class="FavoriteButton fa-scale-110 fa-old-padding -interactive"
|
2019-07-05 07:17:44 +00:00
|
|
|
:title="$t('tool_tip.favorite')"
|
2020-10-19 16:38:49 +00:00
|
|
|
:icon="[status.favorited ? 'fas' : 'far', 'star']"
|
|
|
|
:spin="animated"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="favorite()"
|
|
|
|
/>
|
2019-09-29 19:33:15 +00:00
|
|
|
<span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span>
|
2018-02-01 22:45:29 +00:00
|
|
|
</div>
|
|
|
|
<div v-else>
|
2020-10-19 16:38:49 +00:00
|
|
|
<FAIcon
|
2019-07-05 07:17:44 +00:00
|
|
|
:class="classes"
|
2020-10-28 19:31:16 +00:00
|
|
|
class="FavoriteButton fa-scale-110 fa-old-padding"
|
2019-07-05 07:17:44 +00:00
|
|
|
:title="$t('tool_tip.favorite')"
|
2020-10-19 16:38:49 +00:00
|
|
|
:icon="['far', 'star']"
|
2019-07-05 07:17:44 +00:00
|
|
|
/>
|
2019-09-29 19:33:15 +00:00
|
|
|
<span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span>
|
2016-10-30 15:12:35 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./favorite_button.js" ></script>
|
|
|
|
|
2018-04-01 02:28:20 +00:00
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
2020-10-19 16:38:49 +00:00
|
|
|
.FavoriteButton {
|
|
|
|
&.-interactive {
|
|
|
|
cursor: pointer;
|
|
|
|
animation-duration: 0.6s;
|
2018-04-01 02:28:20 +00:00
|
|
|
|
2020-10-19 16:38:49 +00:00
|
|
|
&:hover {
|
|
|
|
color: $fallback--cOrange;
|
|
|
|
color: var(--cOrange, $fallback--cOrange);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.-favorited {
|
2018-04-01 02:28:20 +00:00
|
|
|
color: $fallback--cOrange;
|
|
|
|
color: var(--cOrange, $fallback--cOrange);
|
2018-04-07 16:30:27 +00:00
|
|
|
}
|
2018-04-01 02:28:20 +00:00
|
|
|
}
|
2016-10-30 15:12:35 +00:00
|
|
|
</style>
|