allow emoji reacts to be non-square
This commit is contained in:
parent
1768393257
commit
a0681ca17c
5 changed files with 23 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||||
import UserListPopover from '../user_list_popover/user_list_popover.vue'
|
import UserListPopover from '../user_list_popover/user_list_popover.vue'
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faCheck, faMinus, faPlus } from '@fortawesome/free-solid-svg-icons'
|
import { faCheck, faMinus, faPlus } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
@ -48,6 +49,9 @@ const EmojiReactions = {
|
||||||
statusId: this.status.id,
|
statusId: this.status.id,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return useMergedConfigStore().mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleShowAll() {
|
toggleShowAll() {
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,12 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
&.-wide {
|
||||||
|
width: auto;
|
||||||
|
min-width: var(--emoji-size);
|
||||||
|
max-width: calc(var(--emoji-size) * 3);
|
||||||
|
}
|
||||||
|
|
||||||
--_still_image-label-scale: 0.3;
|
--_still_image-label-scale: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,6 +68,12 @@
|
||||||
font-size: calc(var(--emoji-size) * 0.8);
|
font-size: calc(var(--emoji-size) * 0.8);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
&.-wide {
|
||||||
|
width: auto;
|
||||||
|
min-width: var(--emoji-size);
|
||||||
|
max-width: calc(var(--emoji-size) * 3);
|
||||||
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,13 @@
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="reaction-emoji"
|
class="reaction-emoji"
|
||||||
|
:class="{ ['-wide']: allowNonSquareEmoji }"
|
||||||
>
|
>
|
||||||
<StillImage
|
<StillImage
|
||||||
v-if="reaction.url"
|
v-if="reaction.url"
|
||||||
:src="reaction.url"
|
:src="reaction.url"
|
||||||
class="reaction-emoji-content"
|
class="reaction-emoji-content"
|
||||||
|
:class="{ ['-wide']: allowNonSquareEmoji }"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
v-else
|
v-else
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,7 @@
|
||||||
:src="notification.emoji_url"
|
:src="notification.emoji_url"
|
||||||
:alt="notification.emoji"
|
:alt="notification.emoji"
|
||||||
:title="notification.emoji"
|
:title="notification.emoji"
|
||||||
|
:class="{ ['-wide']: allowNonSquareEmoji }"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-else
|
v-else
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,10 @@
|
||||||
max-width: 1.25em;
|
max-width: 1.25em;
|
||||||
height: 1.25em;
|
height: 1.25em;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
||||||
|
&.-wide {
|
||||||
|
max-width: 3.75em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.emoji-reaction-emoji-image {
|
.emoji-reaction-emoji-image {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue