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