diff --git a/src/components/announcement/announcement.js b/src/components/announcement/announcement.js
index 6f6190ebb..6b45b2b90 100644
--- a/src/components/announcement/announcement.js
+++ b/src/components/announcement/announcement.js
@@ -29,8 +29,8 @@ const Announcement = {
currentUser: (state) => state.users.currentUser,
}),
canEditAnnouncement() {
- return (
- this.currentUser?.privileges.has('announcements_manage_announcements')
+ return this.currentUser?.privileges.has(
+ 'announcements_manage_announcements',
)
},
content() {
diff --git a/src/components/announcements_page/announcements_page.js b/src/components/announcements_page/announcements_page.js
index a8d498075..802e90cf6 100644
--- a/src/components/announcements_page/announcements_page.js
+++ b/src/components/announcements_page/announcements_page.js
@@ -33,8 +33,8 @@ const AnnouncementsPage = {
return useAnnouncementsStore().announcements
},
canPostAnnouncement() {
- return (
- this.currentUser?.privileges.has('announcements_manage_announcements')
+ return this.currentUser?.privileges.has(
+ 'announcements_manage_announcements',
)
},
},
diff --git a/src/components/edit_status_modal/edit_status_modal.js b/src/components/edit_status_modal/edit_status_modal.js
index 78c5c51aa..59c142d08 100644
--- a/src/components/edit_status_modal/edit_status_modal.js
+++ b/src/components/edit_status_modal/edit_status_modal.js
@@ -42,9 +42,7 @@ const EditStatusModal = {
},
isFormVisible(val) {
if (val) {
- this.$nextTick(
- () => this.$el?.querySelector('textarea').focus(),
- )
+ this.$nextTick(() => this.$el?.querySelector('textarea').focus())
}
},
},
diff --git a/src/components/mention_link/mention_link.js b/src/components/mention_link/mention_link.js
index ff4612395..0309079e8 100644
--- a/src/components/mention_link/mention_link.js
+++ b/src/components/mention_link/mention_link.js
@@ -75,9 +75,7 @@ const MentionLink = {
},
computed: {
user() {
- return (
- this.url && this.$store?.getters.findUserByUrl(this.url)
- )
+ return this.url && this.$store?.getters.findUserByUrl(this.url)
},
isYou() {
// FIXME why user !== currentUser???
diff --git a/src/components/navigation/filter.js b/src/components/navigation/filter.js
index ff91d97d9..0cbefd3fa 100644
--- a/src/components/navigation/filter.js
+++ b/src/components/navigation/filter.js
@@ -15,8 +15,7 @@ export const filterNavigation = (
if (!isFederating && set.has('federating')) return false
if (!currentUser && isPrivate && set.has('!private')) return false
if (!currentUser && !(anon || anonRoute)) return false
- if ((!currentUser?.locked) && set.has('lockedUser'))
- return false
+ if (!currentUser?.locked && set.has('lockedUser')) return false
if (!hasChats && set.has('chats')) return false
if (!hasAnnouncements && set.has('announcements')) return false
if (!supportsBubbleTimeline && set.has('supportsBubbleTimeline'))
diff --git a/src/components/poll/poll.js b/src/components/poll/poll.js
index f2d4b0ee5..0ce304a0a 100644
--- a/src/components/poll/poll.js
+++ b/src/components/poll/poll.js
@@ -39,13 +39,13 @@ export default {
return storePoll || {}
},
options() {
- return (this.poll?.options) || []
+ return this.poll?.options || []
},
expiresAt() {
- return (this.poll?.expires_at) || null
+ return this.poll?.expires_at || null
},
expired() {
- return (this.poll?.expired) || false
+ return this.poll?.expired || false
},
expirationLabel() {
if (useMergedConfigStore().mergedConfig.useAbsoluteTimeFormat) {
diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js
index 857caadcb..40344834b 100644
--- a/src/components/popover/popover.js
+++ b/src/components/popover/popover.js
@@ -129,9 +129,7 @@ const Popover = {
// Popover will be anchored around this element, trigger ref is the container, so
// its children are what are inside the slot. Expect only one v-slot:trigger.
const anchorEl =
- this.anchorEl ||
- (this.$refs.trigger?.children[0]) ||
- this.$el
+ this.anchorEl || this.$refs.trigger?.children[0] || this.$el
// SVGs don't have offsetWidth/Height, use fallback
const anchorHeight = anchorEl.offsetHeight || anchorEl.clientHeight
const anchorWidth = anchorEl.offsetWidth || anchorEl.clientWidth
@@ -246,12 +244,12 @@ const Popover = {
if (bottomBoundary + content.offsetHeight > yBounds.max) usingTop = true
if (topBoundary - content.offsetHeight < yBounds.min) usingTop = false
- const yOffset = (this.offset?.y) || 0
+ const yOffset = this.offset?.y || 0
translateY = usingTop
? topBoundary - yOffset - content.offsetHeight
: bottomBoundary + yOffset
- const xOffset = (this.offset?.x) || 0
+ const xOffset = this.offset?.x || 0
translateX = origin.x + horizOffset + xOffset
} else {
// Default to whatever user wished with placement prop
@@ -267,12 +265,12 @@ const Popover = {
if (rightBoundary + content.offsetWidth > xBounds.max) usingLeft = true
if (leftBoundary - content.offsetWidth < xBounds.min) usingLeft = false
- const xOffset = (this.offset?.x) || 0
+ const xOffset = this.offset?.x || 0
translateX = usingLeft
? leftBoundary - xOffset - content.offsetWidth
: rightBoundary + xOffset
- const yOffset = (this.offset?.y) || 0
+ const yOffset = this.offset?.y || 0
translateY = origin.y + vertOffset + yOffset
}
diff --git a/src/components/post_status_modal/post_status_modal.js b/src/components/post_status_modal/post_status_modal.js
index 7e9f1a4f8..e7001db9a 100644
--- a/src/components/post_status_modal/post_status_modal.js
+++ b/src/components/post_status_modal/post_status_modal.js
@@ -40,9 +40,7 @@ const PostStatusModal = {
},
isFormVisible(val) {
if (val) {
- this.$nextTick(
- () => this.$el?.querySelector('textarea').focus(),
- )
+ this.$nextTick(() => this.$el?.querySelector('textarea').focus())
}
},
},
diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx
index 090253d91..a00bf2c47 100644
--- a/src/components/rich_content/rich_content.jsx
+++ b/src/components/rich_content/rich_content.jsx
@@ -258,10 +258,7 @@ export default {
currentMentions = null
}
} else if (Tag === 'span') {
- if (
- this.handleLinks &&
- fullAttrs.class?.includes('h-card')
- ) {
+ if (this.handleLinks && fullAttrs.class?.includes('h-card')) {
return ['', children.map(processItem), '']
}
}
@@ -299,7 +296,7 @@ export default {
const attrs = getAttrs(opener, () => true)
// should only be this
if (
- (fullAttrs.class?.includes('hashtag')) || // Pleroma style
+ fullAttrs.class?.includes('hashtag') || // Pleroma style
fullAttrs.rel === 'tag' // Mastodon style
) {
return renderHashtag(attrs, children, encounteredTextReverse)
diff --git a/src/components/status/status.js b/src/components/status/status.js
index cd3ae44d0..3e10a24e1 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -128,8 +128,7 @@ const Status = {
computed: {
showReasonMutedThread() {
return (
- (this.status.thread_muted ||
- (this.status.reblog?.thread_muted)) &&
+ (this.status.thread_muted || this.status.reblog?.thread_muted) &&
!this.inConversation
)
},
diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.jsx
index f9a35ad1c..01913f709 100644
--- a/src/components/tab_switcher/tab_switcher.jsx
+++ b/src/components/tab_switcher/tab_switcher.jsx
@@ -111,7 +111,11 @@ export default {
type="button"
role="tab"
>
-
+
{props.label ? '' : props.label}
diff --git a/src/services/chat_utils/chat_utils.js b/src/services/chat_utils/chat_utils.js
index 05ba80bc3..bc02981cd 100644
--- a/src/services/chat_utils/chat_utils.js
+++ b/src/services/chat_utils/chat_utils.js
@@ -12,9 +12,7 @@ export const maybeShowChatNotification = (chat) => {
body: chat.lastMessage.content,
}
- if (
- chat.lastMessage.attachment?.type === 'image'
- ) {
+ if (chat.lastMessage.attachment?.type === 'image') {
opts.image = chat.lastMessage.attachment.preview_url
}
diff --git a/src/services/notification_utils/notification_utils.js b/src/services/notification_utils/notification_utils.js
index 2339f1431..46b81cc66 100644
--- a/src/services/notification_utils/notification_utils.js
+++ b/src/services/notification_utils/notification_utils.js
@@ -175,10 +175,7 @@ export const prepareNotificationObject = (notification, i18n) => {
}
// Shows first attached non-nsfw image, if any. Should add configuration for this somehow...
- if (
- !status.nsfw &&
- status?.attachments?.[0]?.mimetype.startsWith('image/')
- ) {
+ if (!status.nsfw && status?.attachments?.[0]?.mimetype.startsWith('image/')) {
notifObj.image = status.attachments[0].url
}
diff --git a/src/services/sw/sw.js b/src/services/sw/sw.js
index b114cb0de..2b7dabd41 100644
--- a/src/services/sw/sw.js
+++ b/src/services/sw/sw.js
@@ -1,7 +1,9 @@
/* global process */
function urlBase64ToUint8Array(base64String) {
const padding = '='.repeat((4 - (base64String.length % 4)) % 4)
- const base64 = (base64String + padding).replaceAll('-', '+').replace(/_/g, '/')
+ const base64 = (base64String + padding)
+ .replaceAll('-', '+')
+ .replace(/_/g, '/')
const rawData = window.atob(base64)
return Uint8Array.from([...rawData].map((char) => char.codePointAt(0)))
diff --git a/src/services/theme_data/theme_data.service.js b/src/services/theme_data/theme_data.service.js
index 4f1fe0a76..cc5553936 100644
--- a/src/services/theme_data/theme_data.service.js
+++ b/src/services/theme_data/theme_data.service.js
@@ -244,10 +244,7 @@ export const OPACITIES = Object.entries(SLOT_INHERITANCE).reduce((acc, [k]) => {
...acc,
[opacity]: {
defaultValue: DEFAULT_OPACITY[opacity] || 1,
- affectedSlots: [
- ...((acc[opacity]?.affectedSlots) || []),
- k,
- ],
+ affectedSlots: [...(acc[opacity]?.affectedSlots || []), k],
},
}
} else {
diff --git a/src/stores/chats.js b/src/stores/chats.js
index c66bc2658..7908da9c8 100644
--- a/src/stores/chats.js
+++ b/src/stores/chats.js
@@ -69,8 +69,7 @@ export const useChatsStore = defineStore('chats', {
if (chat) {
const isNewMessage =
- (chat.lastMessage?.id) !==
- (updatedChat.lastMessage?.id)
+ chat.lastMessage?.id !== updatedChat.lastMessage?.id
chat.lastMessage = updatedChat.lastMessage
chat.unread = updatedChat.unread
chat.updated_at = updatedChat.updated_at
diff --git a/src/stores/interface.js b/src/stores/interface.js
index cc56e6a48..edc879614 100644
--- a/src/stores/interface.js
+++ b/src/stores/interface.js
@@ -577,7 +577,8 @@ export const useInterfaceStore = defineStore('interface', {
return { name: x.variant, ...cleanDirectives }
})
.forEach((palette) => {
- const key = 'style.' + palette.name.toLowerCase().replaceAll(' ', '_')
+ const key =
+ 'style.' + palette.name.toLowerCase().replaceAll(' ', '_')
if (!firstStylePaletteName) firstStylePaletteName = key
palettesIndex[key] = () => Promise.resolve(palette)
})
diff --git a/src/stores/sync_config.js b/src/stores/sync_config.js
index 723cd9397..3b71478c1 100644
--- a/src/stores/sync_config.js
+++ b/src/stores/sync_config.js
@@ -195,9 +195,10 @@ export const _getRecentData = (cache, live, isTest) => {
}
export const _getAllFlags = (recent, stale) => {
+ const recentStorage = toRaw(recent?.flagStorage)
+ const staleStorage = toRaw(stale?.flagStorage)
+
return Array.from(
- recentStorage = toRaw(recent?.flagStorage)
- staleStorage = toRaw(stale?.flagStorage)
new Set([
...Object.keys(recentStorage || {}),
...Object.keys(staleStorage || {}),
diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js
index 48cd5eb91..6ea574304 100644
--- a/test/unit/specs/components/rich_content.spec.js
+++ b/test/unit/specs/components/rich_content.spec.js
@@ -363,10 +363,7 @@ describe('RichContent', () => {
})
expect(
- wrapper
- .html()
- .replaceAll('\n', '')
- .replaceAll('', ''),
+ wrapper.html().replaceAll('\n', '').replaceAll('', ''),
).to.eql(compwrap(expected))
})
@@ -436,10 +433,7 @@ describe('RichContent', () => {
})
expect(
- wrapper
- .html()
- .replaceAll('\n', '')
- .replaceAll('', ''),
+ wrapper.html().replaceAll('\n', '').replaceAll('', ''),
).to.eql(compwrap(expected))
})