aboutsummaryrefslogtreecommitdiff
path: root/src/components/reply_button/reply_button.vue
diff options
context:
space:
mode:
authorShpuld Shpuldson <shp@cock.li>2020-12-04 11:20:01 +0200
committerShpuld Shpuldson <shp@cock.li>2020-12-04 11:20:01 +0200
commit1fd1553a1c06f22ce5718b16814d0f03688fdc06 (patch)
tree6416934d1cf657b4b7fe27f628add4940c356a74 /src/components/reply_button/reply_button.vue
parent15bed586dcd1d10a6a05c664cf5bab72cdbf2a46 (diff)
parent42c747a342cd7d435dcbe411276ac4999ff92395 (diff)
Merge branch 'develop' into feat/report-notification
Diffstat (limited to 'src/components/reply_button/reply_button.vue')
-rw-r--r--src/components/reply_button/reply_button.vue53
1 files changed, 36 insertions, 17 deletions
diff --git a/src/components/reply_button/reply_button.vue b/src/components/reply_button/reply_button.vue
index a0ac8941..c17041da 100644
--- a/src/components/reply_button/reply_button.vue
+++ b/src/components/reply_button/reply_button.vue
@@ -1,20 +1,28 @@
<template>
- <div>
- <FAIcon
+ <div class="ReplyButton">
+ <button
v-if="loggedIn"
- class="ReplyButton fa-scale-110 fa-old-padding -interactive"
- icon="reply"
- :title="$t('tool_tip.reply')"
+ class="button-unstyled interactive"
:class="{'-active': replying}"
- @click.prevent="$emit('toggle')"
- />
- <FAIcon
- v-else
- icon="reply"
- class="ReplyButton fa-scale-110 fa-old-padding"
:title="$t('tool_tip.reply')"
- />
- <span v-if="status.replies_count > 0">
+ @click.prevent="$emit('toggle')"
+ >
+ <FAIcon
+ class="fa-scale-110 fa-old-padding"
+ icon="reply"
+ />
+ </button>
+ <span v-else>
+ <FAIcon
+ icon="reply"
+ class="fa-scale-110 fa-old-padding"
+ :title="$t('tool_tip.reply')"
+ />
+ </span>
+ <span
+ v-if="status.replies_count > 0"
+ class="action-counter"
+ >
{{ status.replies_count }}
</span>
</div>
@@ -26,14 +34,25 @@
@import '../../_variables.scss';
.ReplyButton {
- &.-interactive {
- cursor: pointer;
+ display: flex;
- &:hover,
- &.-active {
+ > :first-child {
+ padding: 10px;
+ margin: -10px -8px -10px -10px;
+ }
+
+ .action-counter {
+ pointer-events: none;
+ user-select: none;
+ }
+
+ .interactive {
+ &:hover .svg-inline--fa,
+ &.-active .svg-inline--fa {
color: $fallback--cBlue;
color: var(--cBlue, $fallback--cBlue);
}
}
+
}
</style>