remove references to vuex
This commit is contained in:
parent
5b9027f17a
commit
7ae22bbb75
10 changed files with 3 additions and 29 deletions
|
|
@ -71,7 +71,6 @@ const chatNew = {
|
|||
|
||||
this.loading = true
|
||||
this.userIds = []
|
||||
this.$store
|
||||
useSearchStore()
|
||||
.search({ q: query, resolve: true, type: 'accounts' })
|
||||
.then((data) => {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ const EditStatusForm = {
|
|||
},
|
||||
doEditStatus({ status, spoilerText, sensitive, media, contentType, poll }) {
|
||||
const params = {
|
||||
store: this.$store,
|
||||
statusId: this.params.statusId,
|
||||
status,
|
||||
spoilerText,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -418,7 +418,6 @@ export default {
|
|||
...useEmojiStore().standardEmojiList,
|
||||
...useEmojiStore().customEmoji,
|
||||
],
|
||||
store: this.$store,
|
||||
})
|
||||
},
|
||||
emojiSuggestor() {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -29,11 +29,6 @@ const message3 = {
|
|||
|
||||
const global = {
|
||||
mocks: {
|
||||
$store: {
|
||||
state: {
|
||||
api: {},
|
||||
},
|
||||
},
|
||||
$route: {
|
||||
params: {
|
||||
recipient_id: 2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue