diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2020-11-26 18:23:53 +0200 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2020-11-26 18:23:53 +0200 |
| commit | bee77ffdb284601720b9a13a19ca029af258d617 (patch) | |
| tree | 267978503da416976e9f5d48fee6ef6dae9252ec /src/components/favorite_button | |
| parent | ebe3b38a90d99da4af1a9c99bdb592472f2d8892 (diff) | |
fix retweet event handler, fix text being selectable for status action counters
Diffstat (limited to 'src/components/favorite_button')
| -rw-r--r-- | src/components/favorite_button/favorite_button.vue | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue index d54ae78c..9fc4f9d8 100644 --- a/src/components/favorite_button/favorite_button.vue +++ b/src/components/favorite_button/favorite_button.vue @@ -1,8 +1,8 @@ <template> - <div> + <div class="FavoriteButton"> <button v-if="loggedIn" - class="FavoriteButton -interactive button-unstyled -padded" + class="button-unstyled interactive" :class="status.favorited && '-favorited'" :title="$t('tool_tip.favorite')" @click.prevent="favorite()" @@ -19,7 +19,12 @@ :title="$t('tool_tip.favorite')" :icon="['far', 'star']" /> - <span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span> + <span + v-if="!mergedConfig.hidePostStats && status.fave_num > 0" + class="action-counter" + > + {{ status.fave_num }} + </span> </div> </template> @@ -29,8 +34,19 @@ @import '../../_variables.scss'; .FavoriteButton { - &.-interactive { + display: flex; + + > :first-child { + padding: 10px; + margin: -10px -5px -10px -10px; + } + + .action-counter { + pointer-events: none; + user-select: none; + } + .interactive { .svg-inline--fa { animation-duration: 0.6s; } |
