diff --git a/src/components/chat_new/chat_new.js b/src/components/chat_new/chat_new.js index 4f015db6a..03960a287 100644 --- a/src/components/chat_new/chat_new.js +++ b/src/components/chat_new/chat_new.js @@ -71,7 +71,6 @@ const chatNew = { this.loading = true this.userIds = [] - this.$store useSearchStore() .search({ q: query, resolve: true, type: 'accounts' }) .then((data) => { diff --git a/src/components/edit_status_form/edit_status_form.js b/src/components/edit_status_form/edit_status_form.js index f7fd3d04d..30bb98590 100644 --- a/src/components/edit_status_form/edit_status_form.js +++ b/src/components/edit_status_form/edit_status_form.js @@ -17,7 +17,6 @@ const EditStatusForm = { }, doEditStatus({ status, spoilerText, sensitive, media, contentType, poll }) { const params = { - store: this.$store, statusId: this.params.statusId, status, spoilerText, diff --git a/src/components/media_upload/media_upload.js b/src/components/media_upload/media_upload.js index 2cb6a96e6..d3867b1d0 100644 --- a/src/components/media_upload/media_upload.js +++ b/src/components/media_upload/media_upload.js @@ -122,7 +122,6 @@ const mediaUpload = { }, async uploadFile(file) { const self = this - const store = this.$store if (file.size > useInstanceStore().uploadlimit) { const filesize = fileSizeFormatService.fileSizeFormat(file.size) const allowedsize = fileSizeFormatService.fileSizeFormat( @@ -145,7 +144,7 @@ const mediaUpload = { self.$emit('uploading') self.uploadCount++ - statusPosterService.uploadMedia({ store, formData }).then( + statusPosterService.uploadMedia({ formData }).then( (fileData) => { self.$emit('uploaded', fileData) self.decreaseUploadCount() diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 2e303a338..a261f9937 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -401,8 +401,6 @@ const PostStatusForm = { contentType: this.newStatus.contentType, poll, idempotencyKey: this.idempotencyKey, - - store: this.$store, } }, @@ -413,7 +411,6 @@ const PostStatusForm = { ...useEmojiStore().standardEmojiList, ...useEmojiStore().customEmoji, ], - store: this.$store, }) }, emojiSuggestor() { @@ -575,7 +572,7 @@ const PostStatusForm = { ...mapState(useUsersStore, ['currentUser']), ...mapState(useMergedConfigStore, ['mergedConfig']), ...mapState(useInterfaceStore, { - mobileLayout: (store) => store.mobileLayout, + mobileLayout: (state) => state.mobileLayout, }), }, watch: { @@ -752,7 +749,6 @@ const PostStatusForm = { const description = this.newStatus.mediaDescriptions[id] if (!description || description.trim() === '') return return statusPoster.setMediaDescription({ - store: this.$store, id, description, }) diff --git a/src/components/status_action_buttons/status_action_buttons.js b/src/components/status_action_buttons/status_action_buttons.js index bbbdb79e5..9f2720162 100644 --- a/src/components/status_action_buttons/status_action_buttons.js +++ b/src/components/status_action_buttons/status_action_buttons.js @@ -97,9 +97,6 @@ const StatusActionButtons = { replying: this.replying, emojiPickerShown: this.emojiPickerShown, emit: this.$emit, - dispatch: this.$store.dispatch, - state: this.$store.state, - getters: this.$store.getters, router: this.$router, currentUser: this.currentUser, loggedIn: !!this.currentUser, diff --git a/src/components/sticker_picker/sticker_picker.js b/src/components/sticker_picker/sticker_picker.js index 482aacb81..4d7d1d698 100644 --- a/src/components/sticker_picker/sticker_picker.js +++ b/src/components/sticker_picker/sticker_picker.js @@ -29,14 +29,13 @@ const StickerPicker = { } }, pick(sticker, name) { - const store = this.$store // TODO remove this workaround by finding a way to bypass reuploads fetch(sticker).then((res) => { res.blob().then((blob) => { const file = new File([blob], name, { mimetype: 'image/png' }) const formData = new FormData() formData.append('file', file) - statusPosterService.uploadMedia({ store, formData }).then( + statusPosterService.uploadMedia({ formData }).then( (fileData) => { this.$emit('uploaded', fileData) this.clear() diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 739c1579b..40fdd7413 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -418,7 +418,6 @@ export default { ...useEmojiStore().standardEmojiList, ...useEmojiStore().customEmoji, ], - store: this.$store, }) }, emojiSuggestor() { diff --git a/src/main.js b/src/main.js index 735725250..bb76a1cf0 100644 --- a/src/main.js +++ b/src/main.js @@ -102,7 +102,6 @@ const persistedStateOptions = { strict: false, // Socket modifies itself, let's ignore this for now. // strict: process.env.NODE_ENV !== 'production' }) - window.vuex = store // Temporarily passing pinia and vuex stores along with storageError result until migration is fully complete. return await afterStoreSetup({ pinia, store, storageError, i18n }) } catch (e) { diff --git a/src/stores/users.js b/src/stores/users.js index 7471b9ab5..e713bb4c6 100644 --- a/src/stores/users.js +++ b/src/stores/users.js @@ -612,13 +612,6 @@ export const useUsersStore = defineStore('users', { // Login/Logout async loginUser(accessToken) { - const store = window.vuex - const dispatch = - store?.dispatch ?? - (() => { - /* no-op */ - }) // for tests - this.loggingIn = true try { @@ -723,7 +716,6 @@ export const useUsersStore = defineStore('users', { } }, logout() { - const store = window.vuex const oauth = useOAuthStore() // Pause fetching diff --git a/test/unit/specs/components/chat_view.spec.js b/test/unit/specs/components/chat_view.spec.js index ba06b6b4c..dd95b1fd3 100644 --- a/test/unit/specs/components/chat_view.spec.js +++ b/test/unit/specs/components/chat_view.spec.js @@ -29,11 +29,6 @@ const message3 = { const global = { mocks: { - $store: { - state: { - api: {}, - }, - }, $route: { params: { recipient_id: 2,