2019-11-15 16:29:25 +02:00
|
|
|
<template>
|
2022-12-18 22:04:58 +03:00
|
|
|
<span class="ReactButton">
|
|
|
|
<EmojiPicker
|
|
|
|
ref="picker"
|
|
|
|
:enable-sticker-picker="enableStickerPicker"
|
|
|
|
class="emoji-picker-panel"
|
|
|
|
@emoji="addReaction"
|
|
|
|
@show="onShow"
|
|
|
|
@close="onClose"
|
|
|
|
/>
|
|
|
|
<span
|
|
|
|
class="button-unstyled popover-trigger"
|
|
|
|
:title="$t('tool_tip.add_reaction')"
|
|
|
|
@click.stop.prevent="show"
|
|
|
|
>
|
|
|
|
<FALayers>
|
|
|
|
<FAIcon
|
|
|
|
class="fa-scale-110 fa-old-padding"
|
|
|
|
:icon="['far', 'smile-beam']"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
|
|
|
v-show="!expanded"
|
|
|
|
class="focus-marker"
|
|
|
|
transform="shrink-6 up-9 right-17"
|
|
|
|
icon="plus"
|
|
|
|
/>
|
|
|
|
<FAIcon
|
|
|
|
v-show="expanded"
|
|
|
|
class="focus-marker"
|
|
|
|
transform="shrink-6 up-9 right-17"
|
|
|
|
icon="times"
|
|
|
|
/>
|
|
|
|
</FALayers>
|
|
|
|
</span>
|
|
|
|
</span>
|
2019-11-15 16:29:25 +02:00
|
|
|
</template>
|
|
|
|
|
2022-07-31 12:35:48 +03:00
|
|
|
<script src="./react_button.js"></script>
|
2019-11-15 16:29:25 +02:00
|
|
|
|
|
|
|
<style lang="scss">
|
2023-01-09 13:02:16 -05:00
|
|
|
@import "../../variables";
|
|
|
|
@import "../../mixins";
|
2019-11-15 16:29:25 +02:00
|
|
|
|
2021-02-03 09:18:44 +02:00
|
|
|
.ReactButton {
|
|
|
|
.reaction-picker-filter {
|
|
|
|
padding: 0.5em;
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
input {
|
|
|
|
flex: 1;
|
|
|
|
}
|
2020-02-11 12:24:51 +00:00
|
|
|
}
|
2020-01-13 23:34:39 +02:00
|
|
|
|
2021-02-03 09:18:44 +02:00
|
|
|
.reaction-picker-divider {
|
|
|
|
height: 1px;
|
|
|
|
width: 100%;
|
|
|
|
margin: 0.5em;
|
|
|
|
background-color: var(--border, $fallback--border);
|
|
|
|
}
|
2020-01-13 23:34:39 +02:00
|
|
|
|
2021-02-03 09:18:44 +02:00
|
|
|
.reaction-picker {
|
|
|
|
width: 10em;
|
|
|
|
height: 9em;
|
|
|
|
font-size: 1.5em;
|
|
|
|
overflow-y: scroll;
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
padding: 0.5em;
|
|
|
|
text-align: center;
|
|
|
|
align-content: flex-start;
|
|
|
|
user-select: none;
|
2023-01-09 13:02:16 -05:00
|
|
|
mask:
|
|
|
|
linear-gradient(to top, white 0, transparent 100%) bottom no-repeat,
|
|
|
|
linear-gradient(to bottom, white 0, transparent 100%) top no-repeat,
|
|
|
|
linear-gradient(to top, white, white);
|
2021-02-03 09:18:44 +02:00
|
|
|
transition: mask-size 150ms;
|
|
|
|
mask-size: 100% 20px, 100% 20px, auto;
|
2019-11-15 16:29:25 +02:00
|
|
|
|
2021-02-03 09:18:44 +02:00
|
|
|
/* Autoprefixed seem to ignore this one, and also syntax is different */
|
2023-01-09 13:02:16 -05:00
|
|
|
mask-composite: xor;
|
2021-02-03 09:18:44 +02:00
|
|
|
mask-composite: exclude;
|
2020-01-14 10:06:14 +02:00
|
|
|
|
2021-02-03 09:18:44 +02:00
|
|
|
.emoji-button {
|
|
|
|
cursor: pointer;
|
|
|
|
flex-basis: 20%;
|
2022-04-20 23:55:34 +03:00
|
|
|
line-height: 1.5;
|
2021-02-03 09:18:44 +02:00
|
|
|
align-content: center;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
transform: scale(1.25);
|
|
|
|
}
|
2020-01-14 10:06:14 +02:00
|
|
|
}
|
|
|
|
}
|
2019-11-15 16:29:25 +02:00
|
|
|
|
2021-02-03 09:18:44 +02:00
|
|
|
.popover-trigger {
|
|
|
|
padding: 10px;
|
|
|
|
margin: -10px;
|
2019-11-15 16:29:25 +02:00
|
|
|
|
2021-02-03 09:18:44 +02:00
|
|
|
&:hover .svg-inline--fa {
|
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--text, $fallback--text);
|
|
|
|
}
|
2023-01-09 13:02:16 -05:00
|
|
|
|
2022-01-19 21:18:02 -05:00
|
|
|
@include unfocused-style {
|
|
|
|
.focus-marker {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2022-01-16 01:01:19 -05:00
|
|
|
}
|
|
|
|
|
2022-01-19 21:18:02 -05:00
|
|
|
@include focused-style {
|
2022-01-16 01:01:19 -05:00
|
|
|
.focus-marker {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
}
|
2019-11-15 16:29:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|