logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

reply_button.vue (1916B)


  1. <template>
  2. <div class="ReplyButton">
  3. <button
  4. v-if="loggedIn"
  5. class="button-unstyled interactive"
  6. :class="{'-active': replying}"
  7. :title="$t('tool_tip.reply')"
  8. @click.prevent="$emit('toggle')"
  9. >
  10. <FALayers class="fa-old-padding-layer">
  11. <FAIcon
  12. class="fa-scale-110"
  13. icon="reply"
  14. />
  15. <FAIcon
  16. v-if="!replying"
  17. class="focus-marker"
  18. transform="shrink-6 up-8 right-11"
  19. icon="plus"
  20. />
  21. <FAIcon
  22. v-else
  23. class="focus-marker"
  24. transform="shrink-6 up-8 right-11"
  25. icon="times"
  26. />
  27. </FALayers>
  28. </button>
  29. <a
  30. v-else
  31. class="button-unstyled interactive"
  32. target="_blank"
  33. role="button"
  34. :href="remoteInteractionLink"
  35. :title="$t('tool_tip.reply')"
  36. >
  37. <FALayers class="fa-old-padding-layer">
  38. <FAIcon
  39. class="fa-scale-110"
  40. icon="reply"
  41. />
  42. <FAIcon
  43. v-if="!replying"
  44. class="focus-marker"
  45. transform="shrink-6 up-8 right-16"
  46. icon="plus"
  47. />
  48. </FALayers>
  49. </a>
  50. <span
  51. v-if="status.replies_count > 0"
  52. class="action-counter"
  53. >
  54. {{ status.replies_count }}
  55. </span>
  56. </div>
  57. </template>
  58. <script src="./reply_button.js"></script>
  59. <style lang="scss">
  60. @import "../../mixins";
  61. .ReplyButton {
  62. display: flex;
  63. > :first-child {
  64. padding: 10px;
  65. margin: -10px -8px -10px -10px;
  66. }
  67. .action-counter {
  68. pointer-events: none;
  69. user-select: none;
  70. }
  71. .interactive {
  72. &:hover .svg-inline--fa,
  73. &.-active .svg-inline--fa {
  74. color: var(--cBlue);
  75. }
  76. @include unfocused-style {
  77. .focus-marker {
  78. visibility: hidden;
  79. }
  80. }
  81. @include focused-style {
  82. .focus-marker {
  83. visibility: visible;
  84. }
  85. }
  86. }
  87. }
  88. </style>