replacements
This commit is contained in:
parent
75f9bc1775
commit
95a087c313
6 changed files with 28 additions and 26 deletions
|
|
@ -48,10 +48,10 @@ const AccountActions = {
|
||||||
this.showingConfirmBlock = false
|
this.showingConfirmBlock = false
|
||||||
},
|
},
|
||||||
showRepeats() {
|
showRepeats() {
|
||||||
this.$store.dispatch('showReblogs', this.user.id)
|
useUsersStore().showReblogs(this.user.id)
|
||||||
},
|
},
|
||||||
hideRepeats() {
|
hideRepeats() {
|
||||||
this.$store.dispatch('hideReblogs', this.user.id)
|
useUsersStore().hideReblogs(this.user.id)
|
||||||
},
|
},
|
||||||
blockUser() {
|
blockUser() {
|
||||||
if (this.$refs.timedBlockDialog) {
|
if (this.$refs.timedBlockDialog) {
|
||||||
|
|
@ -65,11 +65,11 @@ const AccountActions = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doBlockUser() {
|
doBlockUser() {
|
||||||
this.$store.dispatch('blockUser', { id: this.user.id })
|
useUsersStore().blockUser(this.user.id)
|
||||||
this.hideConfirmBlock()
|
this.hideConfirmBlock()
|
||||||
},
|
},
|
||||||
unblockUser() {
|
unblockUser() {
|
||||||
this.$store.dispatch('unblockUser', this.user.id)
|
useUsersStore().unblockUser(this.user.id)
|
||||||
},
|
},
|
||||||
removeUserFromFollowers() {
|
removeUserFromFollowers() {
|
||||||
if (!this.shouldConfirmRemoveUserFromFollowers) {
|
if (!this.shouldConfirmRemoveUserFromFollowers) {
|
||||||
|
|
@ -79,7 +79,7 @@ const AccountActions = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doRemoveUserFromFollowers() {
|
doRemoveUserFromFollowers() {
|
||||||
this.$store.dispatch('removeUserFromFollowers', this.user.id)
|
useUsersStore().removeUserFromFollowers(this.user.id)
|
||||||
this.hideConfirmRemoveUserFromFollowers()
|
this.hideConfirmRemoveUserFromFollowers()
|
||||||
},
|
},
|
||||||
reportUser() {
|
reportUser() {
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,13 @@ const BlockCard = {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
unblockUser() {
|
unblockUser() {
|
||||||
this.$store.dispatch('unblockUser', this.user.id)
|
useUsersStore().unblockUser(this.user.id)
|
||||||
},
|
},
|
||||||
blockUser() {
|
blockUser() {
|
||||||
if (this.blockExpiration) {
|
if (this.blockExpiration) {
|
||||||
this.$refs.timedBlockDialog.optionallyPrompt()
|
this.$refs.timedBlockDialog.optionallyPrompt()
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('blockUser', { id: this.user.id })
|
useUsersStore().blockUser(this.user.id)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { defineAsyncComponent } from 'vue'
|
||||||
import Select from 'src/components/select/select.vue'
|
import Select from 'src/components/select/select.vue'
|
||||||
|
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
|
import { useStatusesStore } from 'src/stores/statuses.js'
|
||||||
import { useUsersStore } from 'src/stores/users.js'
|
import { useUsersStore } from 'src/stores/users.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -69,17 +70,17 @@ export default {
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case 'domain': {
|
case 'domain': {
|
||||||
if (!this.domainIsMuted) {
|
if (!this.domainIsMuted) {
|
||||||
this.$store.dispatch('muteDomain', this.domain)
|
useUsersStore().muteDomain(this.domain)
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('unmuteDomain', this.domain)
|
useUsersStore().unmuteDomain(this.domain)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'conversation': {
|
case 'conversation': {
|
||||||
if (!this.conversationIsMuted) {
|
if (!this.conversationIsMuted) {
|
||||||
this.$store.dispatch('muteConversation', { id: this.status.id })
|
useStatusesStore().muteConversation(this.status.id)
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('unmuteConversation', { id: this.status.id })
|
useStatusesStore().unmuteConversation(this.status.id)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import Popover from 'src/components/popover/popover.vue'
|
||||||
import ActionButton from './action_button.vue'
|
import ActionButton from './action_button.vue'
|
||||||
|
|
||||||
import { useAdminSettingsStore } from 'src/stores/admin_settings.js'
|
import { useAdminSettingsStore } from 'src/stores/admin_settings.js'
|
||||||
|
import { useStatusesStore } from 'src/stores/statuses.js'
|
||||||
import { useUsersStore } from 'src/stores/users.js'
|
import { useUsersStore } from 'src/stores/users.js'
|
||||||
|
|
||||||
import genRandomSeed from 'src/services/random_seed/random_seed.service.js'
|
import genRandomSeed from 'src/services/random_seed/random_seed.service.js'
|
||||||
|
|
@ -105,13 +106,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
unmuteUser() {
|
unmuteUser() {
|
||||||
return this.$store.dispatch('unmuteUser', this.user.id)
|
return useUsersStore().unmuteUser(this.user.id)
|
||||||
},
|
},
|
||||||
unmuteConversation() {
|
unmuteConversation() {
|
||||||
return this.$store.dispatch('unmuteConversation', { id: this.status.id })
|
return useStatusesStore().unmuteConversation(this.status.id)
|
||||||
},
|
},
|
||||||
unmuteDomain() {
|
unmuteDomain() {
|
||||||
return this.$store.dispatch('unmuteDomain', this.domain)
|
return useUsersStore().unmuteDomain(this.domain)
|
||||||
},
|
},
|
||||||
toggleUserMute() {
|
toggleUserMute() {
|
||||||
if (this.userIsMuted) {
|
if (this.userIsMuted) {
|
||||||
|
|
|
||||||
|
|
@ -454,13 +454,13 @@ export default {
|
||||||
this.$refs.timedMuteDialog.optionallyPrompt()
|
this.$refs.timedMuteDialog.optionallyPrompt()
|
||||||
},
|
},
|
||||||
unmuteUser() {
|
unmuteUser() {
|
||||||
this.$store.dispatch('unmuteUser', this.user.id)
|
return useUsersStore().unmuteUser(this.user.id)
|
||||||
},
|
},
|
||||||
subscribeUser() {
|
subscribeUser() {
|
||||||
return this.$store.dispatch('subscribeUser', this.user.id)
|
return useUsersStore().subscribeUser(this.user.id)
|
||||||
},
|
},
|
||||||
unsubscribeUser() {
|
unsubscribeUser() {
|
||||||
return this.$store.dispatch('unsubscribeUser', this.user.id)
|
return useUsersStore().unsubscribeUser(this.user.id)
|
||||||
},
|
},
|
||||||
linkClicked({ target }) {
|
linkClicked({ target }) {
|
||||||
if (target.tagName === 'SPAN') {
|
if (target.tagName === 'SPAN') {
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import Select from 'src/components/select/select.vue'
|
||||||
|
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
import { useSyncConfigStore } from 'src/stores/sync_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'
|
import { durationStrToMs } from 'src/services/date_utils/date_utils.js'
|
||||||
|
|
||||||
|
|
@ -64,13 +65,6 @@ const UserTimedFilterModal = {
|
||||||
expirySeconds() {
|
expirySeconds() {
|
||||||
return Math.floor(durationStrToMs(this.expiryString) / 1000)
|
return Math.floor(durationStrToMs(this.expiryString) / 1000)
|
||||||
},
|
},
|
||||||
requestBody() {
|
|
||||||
const object = { id: this.user.id }
|
|
||||||
if (!this.forever) {
|
|
||||||
object.expiresIn = this.expirySeconds
|
|
||||||
}
|
|
||||||
return object
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
expiration(newVal) {
|
expiration(newVal) {
|
||||||
|
|
@ -89,7 +83,10 @@ const UserTimedFilterModal = {
|
||||||
},
|
},
|
||||||
accept() {
|
accept() {
|
||||||
if (this.isMute) {
|
if (this.isMute) {
|
||||||
this.$store.dispatch('muteUser', this.requestBody)
|
useUsersStore().muteUser(
|
||||||
|
this.user.id,
|
||||||
|
this.forever ? undefined : this.expirySeconds,
|
||||||
|
)
|
||||||
if (this.dontAskAgain) {
|
if (this.dontAskAgain) {
|
||||||
useSyncConfigStore().setSimplePrefAndSave({
|
useSyncConfigStore().setSimplePrefAndSave({
|
||||||
path: 'onMuteDefaultAction',
|
path: 'onMuteDefaultAction',
|
||||||
|
|
@ -97,7 +94,10 @@ const UserTimedFilterModal = {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('blockUser', this.requestBody)
|
useUsersStore().blockUser(
|
||||||
|
this.user.id,
|
||||||
|
this.forever ? undefined : this.expirySeconds,
|
||||||
|
)
|
||||||
if (this.dontAskAgain) {
|
if (this.dontAskAgain) {
|
||||||
useSyncConfigStore().setSimplePrefAndSave({
|
useSyncConfigStore().setSimplePrefAndSave({
|
||||||
path: 'onBlockDefaultAction',
|
path: 'onBlockDefaultAction',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue