remove references to vuex

This commit is contained in:
Henry Jameson 2026-09-02 16:59:58 +03:00
commit 7ae22bbb75
10 changed files with 3 additions and 29 deletions

View file

@ -71,7 +71,6 @@ const chatNew = {
this.loading = true
this.userIds = []
this.$store
useSearchStore()
.search({ q: query, resolve: true, type: 'accounts' })
.then((data) => {

View file

@ -17,7 +17,6 @@ const EditStatusForm = {
},
doEditStatus({ status, spoilerText, sensitive, media, contentType, poll }) {
const params = {
store: this.$store,
statusId: this.params.statusId,
status,
spoilerText,

View file

@ -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()

View file

@ -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,
})

View file

@ -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,

View file

@ -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()

View file

@ -418,7 +418,6 @@ export default {
...useEmojiStore().standardEmojiList,
...useEmojiStore().customEmoji,
],
store: this.$store,
})
},
emojiSuggestor() {

View file

@ -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) {

View file

@ -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

View file

@ -29,11 +29,6 @@ const message3 = {
const global = {
mocks: {
$store: {
state: {
api: {},
},
},
$route: {
params: {
recipient_id: 2,