diff options
| author | Shpuld Shpuldson <shpuld@shpposter.club> | 2020-01-14 10:06:14 +0200 |
|---|---|---|
| committer | Shpuld Shpuldson <shpuld@shpposter.club> | 2020-01-14 10:06:14 +0200 |
| commit | b10b92a876eb185a88e751d028e69063c9117298 (patch) | |
| tree | 1d1029646e295a4fb919ce4392826a90e2829c83 /src/components/react_button | |
| parent | b32888194c2b9de286bcfff9998dae009cea224d (diff) | |
clean up code, fix prediction bug
Diffstat (limited to 'src/components/react_button')
| -rw-r--r-- | src/components/react_button/react_button.js | 5 | ||||
| -rw-r--r-- | src/components/react_button/react_button.vue | 42 |
2 files changed, 26 insertions, 21 deletions
diff --git a/src/components/react_button/react_button.js b/src/components/react_button/react_button.js index 76a49305..d1a179bc 100644 --- a/src/components/react_button/react_button.js +++ b/src/components/react_button/react_button.js @@ -15,8 +15,9 @@ const ReactButton = { } }, methods: { - toggleReactionSelect () { - this.showTooltip = !this.showTooltip + openReactionSelect () { + this.showTooltip = true + this.filterWord = '' }, closeReactionSelect () { this.showTooltip = false diff --git a/src/components/react_button/react_button.vue b/src/components/react_button/react_button.vue index f7015316..ae975dee 100644 --- a/src/components/react_button/react_button.vue +++ b/src/components/react_button/react_button.vue @@ -9,13 +9,16 @@ > <div slot="popover"> <div class="reaction-picker-filter"> - <input v-model="filterWord" placeholder="Search..."> + <input + v-model="filterWord" + :placeholder="$t('emoji.search_emoji')" + > </div> <div class="reaction-picker"> <span v-for="emoji in commonEmojis" :key="emoji" - class="emoji-reaction-button" + class="emoji-button" @click="addReaction($event, emoji)" > {{ emoji }} @@ -24,7 +27,7 @@ <span v-for="(emoji, key) in emojis" :key="key" - class="emoji-reaction-button" + class="emoji-button" @click="addReaction($event, emoji.replacement)" > {{ emoji.replacement }} @@ -34,11 +37,11 @@ </div> <div v-if="loggedIn" - @click.prevent="toggleReactionSelect" + @click.prevent="openReactionSelect" > <i :class="classes" - class="button-icon favorite-button fav-active" + class="button-icon add-reaction-button" :title="$t('tool_tip.add_reaction')" /> <span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span> @@ -58,7 +61,7 @@ .reaction-picker-divider { height: 1px; width: 100%; - margin: 0.4em; + margin: 0.5em; background-color: var(--border, $fallback--border); } @@ -82,26 +85,27 @@ // Autoprefixed seem to ignore this one, and also syntax is different -webkit-mask-composite: xor; mask-composite: exclude; -} -.emoji-reaction-button { - flex-basis: 20%; - line-height: 1.5em; - align-content: center; + .emoji-button { + cursor: pointer; + + flex-basis: 20%; + line-height: 1.5em; + align-content: center; + + &:hover { + transform: scale(1.25); + } + } } -.fav-active { +.add-reaction-button { cursor: pointer; - animation-duration: 0.6s; &:hover { - color: $fallback--cOrange; - color: var(--cOrange, $fallback--cOrange); + color: $fallback--text; + color: var(--text, $fallback--text); } } -.favorite-button.icon-star { - color: $fallback--cOrange; - color: var(--cOrange, $fallback--cOrange); -} </style> |
