logo

pleroma-fe

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

react_button.vue (2389B)


  1. <template>
  2. <span class="ReactButton">
  3. <EmojiPicker
  4. ref="picker"
  5. :enable-sticker-picker="enableStickerPicker"
  6. :hide-custom-emoji="hideCustomEmoji"
  7. class="emoji-picker-panel"
  8. @emoji="addReaction"
  9. @show="onShow"
  10. @close="onClose"
  11. />
  12. <span
  13. class="button-unstyled popover-trigger"
  14. role="button"
  15. :tabindex="0"
  16. :title="$t('tool_tip.add_reaction')"
  17. @click.stop.prevent="show"
  18. >
  19. <FALayers>
  20. <FAIcon
  21. class="fa-scale-110 fa-old-padding"
  22. :icon="['far', 'smile-beam']"
  23. />
  24. <FAIcon
  25. v-show="!expanded"
  26. class="focus-marker"
  27. transform="shrink-6 up-9 right-17"
  28. icon="plus"
  29. />
  30. <FAIcon
  31. v-show="expanded"
  32. class="focus-marker"
  33. transform="shrink-6 up-9 right-17"
  34. icon="times"
  35. />
  36. </FALayers>
  37. </span>
  38. </span>
  39. </template>
  40. <script src="./react_button.js"></script>
  41. <style lang="scss">
  42. @import "../../mixins";
  43. .ReactButton {
  44. .reaction-picker-filter {
  45. padding: 0.5em;
  46. display: flex;
  47. input {
  48. flex: 1;
  49. }
  50. }
  51. .reaction-picker-divider {
  52. height: 1px;
  53. width: 100%;
  54. margin: 0.5em;
  55. background-color: var(--border);
  56. }
  57. .reaction-picker {
  58. width: 10em;
  59. height: 9em;
  60. font-size: 1.5em;
  61. overflow-y: scroll;
  62. display: flex;
  63. flex-wrap: wrap;
  64. padding: 0.5em;
  65. text-align: center;
  66. align-content: flex-start;
  67. user-select: none;
  68. mask:
  69. linear-gradient(to top, white 0, transparent 100%) bottom no-repeat,
  70. linear-gradient(to bottom, white 0, transparent 100%) top no-repeat,
  71. linear-gradient(to top, white, white);
  72. transition: mask-size 150ms;
  73. mask-size: 100% 20px, 100% 20px, auto;
  74. /* Autoprefixed seem to ignore this one, and also syntax is different */
  75. mask-composite: xor;
  76. mask-composite: exclude;
  77. .emoji-button {
  78. cursor: pointer;
  79. flex-basis: 20%;
  80. line-height: 1.5;
  81. align-content: center;
  82. &:hover {
  83. transform: scale(1.25);
  84. }
  85. }
  86. }
  87. .popover-trigger {
  88. padding: 10px;
  89. margin: -10px;
  90. @include unfocused-style {
  91. .focus-marker {
  92. visibility: hidden;
  93. }
  94. }
  95. @include focused-style {
  96. .focus-marker {
  97. visibility: visible;
  98. }
  99. }
  100. }
  101. }
  102. </style>