Compare commits

..

No commits in common. "c1ac4674af2e442b860d9806b55a60df04d01919" and "3711dfa913dbd2583bc30e226dbc2bd33e2a93f8" have entirely different histories.

7 changed files with 23 additions and 31 deletions

View file

@ -5,7 +5,7 @@ import ConfirmModal from './confirm_modal.vue'
import Select from 'src/components/select/select.vue'
export default {
props: ['type', 'user', 'status'],
props: ['type', 'user'],
emits: ['hide', 'show', 'muted'],
data: () => ({
showing: false,

View file

@ -255,7 +255,7 @@ const Status = {
muteReasons () {
return [
this.userIsMuted ? 'user' : null,
this.status.thread_muted ? 'thread' : null,
status.thread_muted ? 'thread' : null,
(this.muteWordHits.length > 0) ? 'wordfilter' : null,
(this.muteBotStatuses && this.botStatus) ? 'bot' : null,
(this.muteSensitiveStatuses && this.sensitiveStatus) ? 'nsfw' : null
@ -280,19 +280,14 @@ const Status = {
case 'nsfw': return this.$t('status.sensitive_muted')
}
}
console.log(this.status)
if (this.muteReasons.length > 1) {
return this.$t(
'status.multi_reason_mute',
{
main: mainReason(),
numReasonsMore: this.muteReasons.length - 1
},
this.muteReasons.length - 1
)
} else {
return mainReason()
}
return this.$t(
'status.multi_reason_mute',
{
main: mainReason(),
numReasonsMore: this.muteReasons.length - 1
},
this.muteReasons.length - 1
)
},
muted () {
if (this.statusoid.user.id === this.currentUser.id) return false
@ -304,7 +299,7 @@ const Status = {
const { reblog } = status
const relationship = this.$store.getters.relationship(status.user.id)
const relationshipReblog = reblog && this.$store.getters.relationship(reblog.user.id)
return (status.muted && !status.thread_muted) ||
return status.muted ||
// Reprööt of a muted post according to BE
(reblog && reblog.muted) ||
// Muted user

View file

@ -58,8 +58,8 @@ export default {
unmuteUser () {
return this.$store.dispatch('unmuteUser', this.user.id)
},
unmuteConversation () {
return this.$store.dispatch('unmuteConversation', { id: this.status.id })
unmuteThread () {
return this.$store.dispatch('unmuteConversation', this.user.id)
},
unmuteDomain () {
return this.$store.dispatch('unmuteDomain', this.user.id)

View file

@ -2,7 +2,7 @@
<div>
<Popover
v-if="button.dropdown?.()"
:trigger="$attrs.extra ? 'hover' : 'click'"
trigger="click"
:offset="{ y: 5 }"
:placement="$attrs.extra ? 'right' : 'top'"
>
@ -40,13 +40,13 @@
<div class="menu-item dropdown-item extra-action -icon">
<button
class="main-button"
@click="toggleConversationMute"
@click="toggleUserMute"
>
<FAIcon
icon="folder-tree"
fixed-width
/>
<template v-if="conversationIsMuted">
<template v-if="threadIsMuted">
{{ $t('status.unmute_conversation') }}
</template>
<template v-else>
@ -81,22 +81,19 @@
v-bind="$attrs"
/>
<teleport to="#modal">
<MuteConfirm
<mute-confirm
ref="confirmConversation"
type="conversation"
:status="status"
:user="user"
/>
<MuteConfirm
<mute-confirm
ref="confirmDomain"
type="domain"
:status="status"
:user="user"
/>
<MuteConfirm
<mute-confirm
ref="confirmUser"
type="user"
:status="status"
:user="user"
/>
</teleport>

View file

@ -311,7 +311,7 @@
/>
</div>
<teleport to="#modal">
<MuteConfirm
<mute-confirm
ref="confirmation"
type="user"
:user="user"

View file

@ -1259,7 +1259,7 @@
"copy_link": "Copy link to status",
"external_source": "External source",
"muted_words": "Wordfiltered: {word} | Wordfiltered: {word} and {numWordsMore} more words",
"multi_reason_mute": "{main} + one more reason | {main} + {numReasonsMore} more reasons",
"multi_reason_mute": "{main} | {main} + one more reason | {main} + {numReasonsMore} more reasons",
"muted_user": "User muted",
"thread_muted": "Thread muted",
"thread_muted_and_words": ", has words:",

View file

@ -549,11 +549,11 @@ const statuses = {
rootState.api.backendInteractor.unpinOwnStatus({ id: statusId })
.then((status) => dispatch('addNewStatuses', { statuses: [status] }))
},
muteConversation ({ rootState, commit }, { id: statusId }) {
muteConversation ({ rootState, commit }, statusId) {
return rootState.api.backendInteractor.muteConversation({ id: statusId })
.then((status) => commit('setMutedStatus', status))
},
unmuteConversation ({ rootState, commit }, { id: statusId }) {
unmuteConversation ({ rootState, commit }, statusId) {
return rootState.api.backendInteractor.unmuteConversation({ id: statusId })
.then((status) => commit('setMutedStatus', status))
},