logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: c27bbfd21cbdc222e442c3f020d2f5592e42e5f9
parent 1e0d75782fc8b5baaf3ac982da1a2d02382d8bca
Author: Henry Jameson <me@hjkos.com>
Date:   Wed, 26 Jun 2024 02:15:32 +0300

some improvements from testing prod

Diffstat:

Msrc/components/emoji_picker/emoji_picker.js15+++++----------
1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js @@ -106,9 +106,6 @@ const EmojiPicker = { } }, inject: ['popoversZLayer'], - mounted () { - this.updateEmojiSize() - }, data () { return { keyword: '', @@ -138,7 +135,7 @@ const EmojiPicker = { const css = window.getComputedStyle(this.$refs.popover.$el) const emojiSize = css.getPropertyValue('--emojiSize') const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '') - const emojiSizeValue = emojiSize.replace(/[^0-9,.]+/, '') + const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, '')) const fontSize = css.getPropertyValue('font-size').replace(/[^0-9,.]+/, '') let emojiSizeReal @@ -245,6 +242,7 @@ const EmojiPicker = { }, onShowing () { const oldContentLoaded = this.contentLoaded + this.updateEmojiSize() this.recalculateItemPerRow() this.$nextTick(() => { this.$refs.search.focus() @@ -287,7 +285,7 @@ const EmojiPicker = { }, computed: { minItemSize () { - return this.emojiHeight + return this.emojiSize }, // used to watch it fontSize () { @@ -299,15 +297,12 @@ const EmojiPicker = { emojiHeight () { return this.emojiSize }, - emojiWidth () { - return this.emojiSize - }, itemPerRow () { console.log( - this.emojiWidth, + this.emojiSize, this.width ) - return this.width ? Math.floor(this.width / this.emojiWidth) : 6 + return this.width ? Math.floor(this.width / this.emojiSize) : 6 }, activeGroupView () { return this.showingStickers ? '' : this.activeGroup