diff --git a/changelog.d/more-fixes.skip b/changelog.d/more-fixes.skip deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 4ccfa4d41..d24684865 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -468,12 +468,7 @@ 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 9bd8a96f9..8a46722ad 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" + :highlight="maybeHighlight === status.id" :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 502a937f6..3d192b1ee 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" - @close-accepted="doCloseModal" + @can-close="doCloseModal" /> diff --git a/src/components/status/status.js b/src/components/status/status.js index 0cfc7cdba..ecbca4c94 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -73,6 +73,8 @@ library.add( faPlay, ) +const camelCase = (name) => name.charAt(0).toUpperCase() + name.slice(1) + const Status = { name: 'Status', components: { @@ -106,6 +108,7 @@ const Status = { inProfile: Boolean, inConversation: Boolean, inQuote: Boolean, + canDive: Boolean, profileUserId: String, simpleTree: Boolean, @@ -115,7 +118,12 @@ 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 f3dd13e43..01603ef2b 100644 --- a/src/components/status_action_buttons/action_button.js +++ b/src/components/status_action_buttons/action_button.js @@ -1,6 +1,8 @@ +import { defineAsyncComponent } from 'vue' + import Popover from 'src/components/popover/popover.vue' -import StatusBookmarkFolderMenu from 'src/components/status_bookmark_folder_menu/status_bookmark_folder_menu.vue' import EmojiPicker from '../emoji_picker/emoji_picker.vue' +import StatusBookmarkFolderMenu from 'src/components/status_bookmark_folder_menu/status_bookmark_folder_menu.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 7a46a1a3b..2da6da555 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,11 +76,7 @@ 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 232d1776d..72d7fb4d7 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.startFetching({ + const fetcher = followRequestFetcher.startFetchingFollowRequests({ store, credentials: useOAuthStore().token, }) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 5bec225ce..6b71fa5e9 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -887,9 +887,7 @@ 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 0ea0341e2..dfb52f50d 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -2,13 +2,14 @@ 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 @@ -301,7 +302,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 @@ -319,11 +320,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}`) @@ -341,10 +342,7 @@ 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 b69d2323e..be2400fc3 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, 'close-accepted') + await waitForEvent(wrapper, 'can-close') }) 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, 'close-accepted') + await waitForEvent(wrapper, 'can-close') }) 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, 'close-accepted') + await waitForEvent(wrapper, 'can-close') 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, 'close-accepted') + await waitForEvent(wrapper, 'can-close') }) })