From 3cee6c59340ec33463c4b7888c28a10fe291e32f Mon Sep 17 00:00:00 2001 From: emma Date: Wed, 15 Feb 2023 00:12:10 +0000 Subject: [PATCH] more formatting --- src/components/blurhash/Blurhash.vue | 52 +++++++++---------- src/components/emoji_grid/emoji_grid.js | 26 +++++----- src/components/emoji_grid/emoji_grid.vue | 4 +- .../follow_request_card.js | 6 ++- .../follow_request_card.vue | 5 +- .../followed_tag_card/FollowedTagCard.vue | 41 ++++++++------- .../post_status_form/post_status_form.vue | 4 +- src/modules/config.js | 2 +- 8 files changed, 71 insertions(+), 69 deletions(-) diff --git a/src/components/blurhash/Blurhash.vue b/src/components/blurhash/Blurhash.vue index c2e7f5b9..76d23d00 100644 --- a/src/components/blurhash/Blurhash.vue +++ b/src/components/blurhash/Blurhash.vue @@ -6,61 +6,59 @@ - + diff --git a/src/components/emoji_grid/emoji_grid.js b/src/components/emoji_grid/emoji_grid.js index f73b0913..2d05cc16 100644 --- a/src/components/emoji_grid/emoji_grid.js +++ b/src/components/emoji_grid/emoji_grid.js @@ -9,7 +9,7 @@ const EmojiGrid = { type: Array } }, - data () { + data() { return { containerWidth: 0, containerHeight: 0, @@ -17,7 +17,7 @@ const EmojiGrid = { resizeObserver: null } }, - mounted () { + mounted() { const rect = this.$refs.container.getBoundingClientRect() this.containerWidth = rect.width this.containerHeight = rect.height @@ -29,29 +29,29 @@ const EmojiGrid = { }) this.resizeObserver.observe(this.$refs.container) }, - beforeUnmount () { + beforeUnmount() { this.resizeObserver.disconnect() this.resizeObserver = null }, watch: { - groups () { + groups() { // Scroll to top when grid content changes if (this.$refs.container) { this.$refs.container.scrollTo(0, 0) } }, - activeGroup (group) { + activeGroup(group) { this.$emit('activeGroup', group) } }, methods: { - onScroll () { + onScroll() { this.scrollPos = this.$refs.container.scrollTop }, - onEmoji (emoji) { + onEmoji(emoji) { this.$emit('emoji', emoji) }, - scrollToItem (itemId) { + scrollToItem(itemId) { const container = this.$refs.container if (!container) return @@ -65,7 +65,7 @@ const EmojiGrid = { }, computed: { // Total height of scroller content - gridHeight () { + gridHeight() { if (this.itemList.length === 0) return 0 const lastItem = this.itemList[this.itemList.length - 1] return ( @@ -73,7 +73,7 @@ const EmojiGrid = { ('title' in lastItem ? GROUP_TITLE_HEIGHT : EMOJI_SIZE) ) }, - activeGroup () { + activeGroup() { const items = this.itemList for (let i = items.length - 1; i >= 0; i--) { const item = items[i] @@ -83,7 +83,7 @@ const EmojiGrid = { } return null }, - itemList () { + itemList() { const items = [] let x = 0 let y = 0 @@ -111,14 +111,14 @@ const EmojiGrid = { } return items }, - visibleItems () { + visibleItems() { const startPos = this.scrollPos - BUFFER_SIZE const endPos = this.scrollPos + this.containerHeight + BUFFER_SIZE return this.itemList.filter((i) => { return i.position.y >= startPos && i.position.y < endPos }) }, - scrolledClass () { + scrolledClass() { if (this.scrollPos <= 5) { return 'scrolled-top' } else if (this.scrollPos >= this.gridHeight - this.containerHeight - 5) { diff --git a/src/components/emoji_grid/emoji_grid.vue b/src/components/emoji_grid/emoji_grid.vue index 94732319..96126e84 100644 --- a/src/components/emoji_grid/emoji_grid.vue +++ b/src/components/emoji_grid/emoji_grid.vue @@ -7,7 +7,7 @@ >
diff --git a/src/components/follow_request_card/follow_request_card.js b/src/components/follow_request_card/follow_request_card.js index ee0fe7ca..854c913f 100644 --- a/src/components/follow_request_card/follow_request_card.js +++ b/src/components/follow_request_card/follow_request_card.js @@ -86,8 +86,10 @@ const FollowRequestCard = { shouldConfirmDeny() { return this.mergedConfig.modalOnDenyFollow }, - show () { - const notifId = this.$store.state.api.followRequests.find(req => req.id === this.user.id) + show() { + const notifId = this.$store.state.api.followRequests.find( + (req) => req.id === this.user.id + ) return notifId !== undefined } diff --git a/src/components/follow_request_card/follow_request_card.vue b/src/components/follow_request_card/follow_request_card.vue index 80445021..6512adf4 100644 --- a/src/components/follow_request_card/follow_request_card.vue +++ b/src/components/follow_request_card/follow_request_card.vue @@ -1,5 +1,8 @@