replacements

This commit is contained in:
Henry Jameson 2026-08-18 03:32:12 +03:00
commit 95a087c313
6 changed files with 28 additions and 26 deletions

View file

@ -48,10 +48,10 @@ const AccountActions = {
this.showingConfirmBlock = false
},
showRepeats() {
this.$store.dispatch('showReblogs', this.user.id)
useUsersStore().showReblogs(this.user.id)
},
hideRepeats() {
this.$store.dispatch('hideReblogs', this.user.id)
useUsersStore().hideReblogs(this.user.id)
},
blockUser() {
if (this.$refs.timedBlockDialog) {
@ -65,11 +65,11 @@ const AccountActions = {
}
},
doBlockUser() {
this.$store.dispatch('blockUser', { id: this.user.id })
useUsersStore().blockUser(this.user.id)
this.hideConfirmBlock()
},
unblockUser() {
this.$store.dispatch('unblockUser', this.user.id)
useUsersStore().unblockUser(this.user.id)
},
removeUserFromFollowers() {
if (!this.shouldConfirmRemoveUserFromFollowers) {
@ -79,7 +79,7 @@ const AccountActions = {
}
},
doRemoveUserFromFollowers() {
this.$store.dispatch('removeUserFromFollowers', this.user.id)
useUsersStore().removeUserFromFollowers(this.user.id)
this.hideConfirmRemoveUserFromFollowers()
},
reportUser() {

View file

@ -36,13 +36,13 @@ const BlockCard = {
},
methods: {
unblockUser() {
this.$store.dispatch('unblockUser', this.user.id)
useUsersStore().unblockUser(this.user.id)
},
blockUser() {
if (this.blockExpiration) {
this.$refs.timedBlockDialog.optionallyPrompt()
} else {
this.$store.dispatch('blockUser', { id: this.user.id })
useUsersStore().blockUser(this.user.id)
}
},
},

View file

@ -4,6 +4,7 @@ import { defineAsyncComponent } from 'vue'
import Select from 'src/components/select/select.vue'
import { useMergedConfigStore } from 'src/stores/merged_config.js'
import { useStatusesStore } from 'src/stores/statuses.js'
import { useUsersStore } from 'src/stores/users.js'
export default {
@ -69,17 +70,17 @@ export default {
switch (this.type) {
case 'domain': {
if (!this.domainIsMuted) {
this.$store.dispatch('muteDomain', this.domain)
useUsersStore().muteDomain(this.domain)
} else {
this.$store.dispatch('unmuteDomain', this.domain)
useUsersStore().unmuteDomain(this.domain)
}
break
}
case 'conversation': {
if (!this.conversationIsMuted) {
this.$store.dispatch('muteConversation', { id: this.status.id })
useStatusesStore().muteConversation(this.status.id)
} else {
this.$store.dispatch('unmuteConversation', { id: this.status.id })
useStatusesStore().unmuteConversation(this.status.id)
}
break
}

View file

@ -4,6 +4,7 @@ import Popover from 'src/components/popover/popover.vue'
import ActionButton from './action_button.vue'
import { useAdminSettingsStore } from 'src/stores/admin_settings.js'
import { useStatusesStore } from 'src/stores/statuses.js'
import { useUsersStore } from 'src/stores/users.js'
import genRandomSeed from 'src/services/random_seed/random_seed.service.js'
@ -105,13 +106,13 @@ export default {
}
},
unmuteUser() {
return this.$store.dispatch('unmuteUser', this.user.id)
return useUsersStore().unmuteUser(this.user.id)
},
unmuteConversation() {
return this.$store.dispatch('unmuteConversation', { id: this.status.id })
return useStatusesStore().unmuteConversation(this.status.id)
},
unmuteDomain() {
return this.$store.dispatch('unmuteDomain', this.domain)
return useUsersStore().unmuteDomain(this.domain)
},
toggleUserMute() {
if (this.userIsMuted) {

View file

@ -454,13 +454,13 @@ export default {
this.$refs.timedMuteDialog.optionallyPrompt()
},
unmuteUser() {
this.$store.dispatch('unmuteUser', this.user.id)
return useUsersStore().unmuteUser(this.user.id)
},
subscribeUser() {
return this.$store.dispatch('subscribeUser', this.user.id)
return useUsersStore().subscribeUser(this.user.id)
},
unsubscribeUser() {
return this.$store.dispatch('unsubscribeUser', this.user.id)
return useUsersStore().unsubscribeUser(this.user.id)
},
linkClicked({ target }) {
if (target.tagName === 'SPAN') {

View file

@ -5,6 +5,7 @@ import Select from 'src/components/select/select.vue'
import { useMergedConfigStore } from 'src/stores/merged_config.js'
import { useSyncConfigStore } from 'src/stores/sync_config.js'
import { useUsersStore } from 'src/stores/users.js'
import { durationStrToMs } from 'src/services/date_utils/date_utils.js'
@ -64,13 +65,6 @@ const UserTimedFilterModal = {
expirySeconds() {
return Math.floor(durationStrToMs(this.expiryString) / 1000)
},
requestBody() {
const object = { id: this.user.id }
if (!this.forever) {
object.expiresIn = this.expirySeconds
}
return object
},
},
watch: {
expiration(newVal) {
@ -89,7 +83,10 @@ const UserTimedFilterModal = {
},
accept() {
if (this.isMute) {
this.$store.dispatch('muteUser', this.requestBody)
useUsersStore().muteUser(
this.user.id,
this.forever ? undefined : this.expirySeconds,
)
if (this.dontAskAgain) {
useSyncConfigStore().setSimplePrefAndSave({
path: 'onMuteDefaultAction',
@ -97,7 +94,10 @@ const UserTimedFilterModal = {
})
}
} else {
this.$store.dispatch('blockUser', this.requestBody)
useUsersStore().blockUser(
this.user.id,
this.forever ? undefined : this.expirySeconds,
)
if (this.dontAskAgain) {
useSyncConfigStore().setSimplePrefAndSave({
path: 'onBlockDefaultAction',