diff --git a/changelog.d/more-fixes.skip b/changelog.d/more-fixes.skip new file mode 100644 index 000000000..e69de29bb diff --git a/src/boot/after_store.js b/src/boot/after_store.js index d24684865..4ccfa4d41 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -468,7 +468,12 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => { app.use(pinia) app.config.errorHandler = (error, instance, info) => { - console.error('Global Vue Error Handler caught an error:', error, instance, info) + console.error( + 'Global Vue Error Handler caught an error:', + error, + instance, + info, + ) useInterfaceStore().setGlobalError({ error, instance, info }) } diff --git a/src/components/conversation/conversation.vue b/src/components/conversation/conversation.vue index 8a46722ad..9bd8a96f9 100644 --- a/src/components/conversation/conversation.vue +++ b/src/components/conversation/conversation.vue @@ -156,7 +156,7 @@ :is-focused-function="isFocused" :get-replies="getReplies" - :highlight="maybeHighlight === status.id" + :highlight="maybeHighlight" :toggle-expanded="toggleExpanded" :simple="treeViewIsSimple" diff --git a/src/components/edit_status_modal/edit_status_modal.vue b/src/components/edit_status_modal/edit_status_modal.vue index 3d192b1ee..502a937f6 100644 --- a/src/components/edit_status_modal/edit_status_modal.vue +++ b/src/components/edit_status_modal/edit_status_modal.vue @@ -16,7 +16,7 @@ :params="params" @posted="doCloseModal" @draft-done="doCloseModal" - @can-close="doCloseModal" + @close-accepted="doCloseModal" /> diff --git a/src/components/status/status.js b/src/components/status/status.js index ecbca4c94..0cfc7cdba 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -73,8 +73,6 @@ library.add( faPlay, ) -const camelCase = (name) => name.charAt(0).toUpperCase() + name.slice(1) - const Status = { name: 'Status', components: { @@ -108,7 +106,6 @@ const Status = { inProfile: Boolean, inConversation: Boolean, inQuote: Boolean, - canDive: Boolean, profileUserId: String, simpleTree: Boolean, @@ -118,12 +115,7 @@ const Status = { threadDisplayStatus: String, }, - emits: [ - 'goto', - 'dive', - 'toggleExpanded', - 'suspendableStateChange' - ], + emits: ['goto', 'dive', 'toggleExpanded', 'suspendableStateChange'], data() { return { replying: false, diff --git a/src/components/status_action_buttons/action_button.js b/src/components/status_action_buttons/action_button.js index 01603ef2b..f3dd13e43 100644 --- a/src/components/status_action_buttons/action_button.js +++ b/src/components/status_action_buttons/action_button.js @@ -1,8 +1,6 @@ -import { defineAsyncComponent } from 'vue' - import Popover from 'src/components/popover/popover.vue' -import EmojiPicker from '../emoji_picker/emoji_picker.vue' import StatusBookmarkFolderMenu from 'src/components/status_bookmark_folder_menu/status_bookmark_folder_menu.vue' +import EmojiPicker from '../emoji_picker/emoji_picker.vue' import { useInstanceStore } from 'src/stores/instance.js' import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js' diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index 2da6da555..7a46a1a3b 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -43,7 +43,7 @@ const StatusBody = { // Used to automatically expand subjects (if collapsed) type: Boolean, default: false, - } + }, }, data() { return { @@ -76,7 +76,11 @@ const StatusBody = { // button. If the default is to collapse statuses with subjects, we just treat it like // a status with a subject; otherwise, we just treat it like a tall status. mightHideBecauseSubject() { - return !this.inConversation && this.hasSubject && this.mergedConfig.collapseMessageWithSubject + return ( + !this.inConversation && + this.hasSubject && + this.mergedConfig.collapseMessageWithSubject + ) }, mightHideBecauseTall() { if (this.singleLine || this.compact) return false diff --git a/src/modules/api.js b/src/modules/api.js index 72d7fb4d7..232d1776d 100644 --- a/src/modules/api.js +++ b/src/modules/api.js @@ -302,7 +302,7 @@ const api = { // Follow requests startFetchingFollowRequests(store) { if (store.state.fetchers.followRequests) return - const fetcher = followRequestFetcher.startFetchingFollowRequests({ + const fetcher = followRequestFetcher.startFetching({ store, credentials: useOAuthStore().token, }) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 6b71fa5e9..5bec225ce 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -887,7 +887,9 @@ const statuses = { statuses: data.statuses, }) - data.statuses = data.statuses.map((s) => store.state.allStatusesObject[s.id]) + data.statuses = data.statuses.map( + (s) => store.state.allStatusesObject[s.id], + ) return data }) }, diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js index dfb52f50d..0ea0341e2 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -2,14 +2,13 @@ import sum from 'hash-sum' import localforage from 'localforage' import { chunk, throttle } from 'lodash' -import { promisedRequest } from 'src/api/helpers.js' - import { getCssRules } from '../theme_data/css_utils.js' import { getEngineChecksum, init } from '../theme_data/theme_data_3.service.js' import { useMergedConfigStore } from 'src/stores/merged_config.js' import { useSyncConfigStore } from 'src/stores/sync_config.js' +import { promisedRequest } from 'src/api/helpers.js' import { ROOT_CONFIG } from 'src/modules/default_config_state.js' // On platforms where this is not supported, it will return undefined @@ -302,7 +301,7 @@ export const applyStyleConfig = (input) => { adoptStyleSheets() } -export const getResourcesIndex = async (url, parser = x => x) => { +export const getResourcesIndex = async (url, parser = (x) => x) => { const cache = 'no-store' const customUrl = url.replace(/\.(\w+)$/, '.custom.$1') let builtin @@ -320,11 +319,11 @@ export const getResourcesIndex = async (url, parser = x => x) => { url: v, cache, }) - .then(({ data: text }) => parser(text)) - .catch((e) => { - console.error(e) - return null - }), + .then(({ data: text }) => parser(text)) + .catch((e) => { + console.error(e) + return null + }), ] } else { console.error(`Unknown resource format - ${k} is a ${typeof v}`) @@ -342,7 +341,10 @@ export const getResourcesIndex = async (url, parser = x => x) => { } try { - const { data: customData } = await promisedRequest({ url: customUrl, cache }) + const { data: customData } = await promisedRequest({ + url: customUrl, + cache, + }) custom = resourceTransform(customData) } catch { custom = [] diff --git a/test/unit/specs/components/draft.spec.js b/test/unit/specs/components/draft.spec.js index be2400fc3..b69d2323e 100644 --- a/test/unit/specs/components/draft.spec.js +++ b/test/unit/specs/components/draft.spec.js @@ -100,7 +100,7 @@ describe('Draft saving', () => { await textarea.setValue('mew mew') wrapper.vm.requestClose() expect(wrapper.vm.$store.getters.draftCount).to.equal(1) - await waitForEvent(wrapper, 'can-close') + await waitForEvent(wrapper, 'close-accepted') }) it('should save when close if auto-save is off, and unsavedPostAction is save', async () => { @@ -122,7 +122,7 @@ describe('Draft saving', () => { await textarea.setValue('mew mew') wrapper.vm.requestClose() expect(wrapper.vm.$store.getters.draftCount).to.equal(1) - await waitForEvent(wrapper, 'can-close') + await waitForEvent(wrapper, 'close-accepted') }) it('should discard when close if auto-save is off, and unsavedPostAction is discard', async () => { @@ -143,7 +143,7 @@ describe('Draft saving', () => { const textarea = wrapper.get('textarea') await textarea.setValue('mew mew') wrapper.vm.requestClose() - await waitForEvent(wrapper, 'can-close') + await waitForEvent(wrapper, 'close-accepted') expect(wrapper.vm.$store.getters.draftCount).to.equal(0) }) @@ -180,6 +180,6 @@ describe('Draft saving', () => { console.info('clicked') expect(wrapper.vm.$store.getters.draftCount).to.equal(1) await flushPromises() - await waitForEvent(wrapper, 'can-close') + await waitForEvent(wrapper, 'close-accepted') }) })