Merge branch '2-10-1-fixes' into 'develop'

Fixes for 2.10.1

See merge request pleroma/pleroma-fe!2195
This commit is contained in:
HJ 2026-01-12 20:24:56 +00:00
commit 127396d2af
12 changed files with 32 additions and 34 deletions

View file

@ -0,0 +1 @@
fixed being unable to set actor type from profile page

View file

@ -0,0 +1 @@
fixed error when clicking mute menu itself (instead of submenu items)

View file

@ -0,0 +1 @@
fixed mute -> domain status submenu not working

View file

@ -15,10 +15,10 @@ const BlockCard = {
return this.relationship.blocking return this.relationship.blocking
}, },
blockExpiryAvailable() { blockExpiryAvailable() {
return this.user.block_expires_at !== undefined return Object.hasOwn(this.user, 'block_expires_at')
}, },
blockExpiry() { blockExpiry() {
return this.user.block_expires_at == null return this.user.block_expires_at === false
? this.$t('user_card.block_expires_forever') ? this.$t('user_card.block_expires_forever')
: this.$t('user_card.block_expires_at', [ : this.$t('user_card.block_expires_at', [
new Date(this.user.mute_expires_at).toLocaleString(), new Date(this.user.mute_expires_at).toLocaleString(),

View file

@ -19,9 +19,9 @@ export default {
}, },
keypath() { keypath() {
if (this.type === 'domain') { if (this.type === 'domain') {
return 'status.mute_domain_confirm' return 'user_card.mute_domain_confirm'
} else if (this.type === 'conversation') { } else if (this.type === 'conversation') {
return 'status.mute_conversation_confirm' return 'user_card.mute_conversation_confirm'
} }
}, },
conversationIsMuted() { conversationIsMuted() {
@ -65,9 +65,9 @@ export default {
switch (this.type) { switch (this.type) {
case 'domain': { case 'domain': {
if (!this.domainIsMuted) { if (!this.domainIsMuted) {
this.$store.dispatch('muteDomain', { id: this.domain }) this.$store.dispatch('muteDomain', this.domain)
} else { } else {
this.$store.dispatch('unmuteDomain', { id: this.domain }) this.$store.dispatch('unmuteDomain', this.domain)
} }
break break
} }

View file

@ -14,10 +14,10 @@ const MuteCard = {
return this.relationship.muting return this.relationship.muting
}, },
muteExpiryAvailable() { muteExpiryAvailable() {
return this.user.mute_expires_at !== undefined return Object.hasOwn(this.user, 'mute_expires_at')
}, },
muteExpiry() { muteExpiry() {
return this.user.mute_expires_at == null return this.user.mute_expires_at === false
? this.$t('user_card.mute_expires_forever') ? this.$t('user_card.mute_expires_forever')
: this.$t('user_card.mute_expires_at', [ : this.$t('user_card.mute_expires_at', [
new Date(this.user.mute_expires_at).toLocaleString(), new Date(this.user.mute_expires_at).toLocaleString(),

View file

@ -63,7 +63,7 @@ export default {
return this.$store.dispatch('unmuteConversation', { id: this.status.id }) return this.$store.dispatch('unmuteConversation', { id: this.status.id })
}, },
unmuteDomain() { unmuteDomain() {
return this.$store.dispatch('unmuteDomain', this.user.id) return this.$store.dispatch('unmuteDomain', this.domain)
}, },
toggleUserMute() { toggleUserMute() {
if (this.userIsMuted) { if (this.userIsMuted) {

View file

@ -98,7 +98,7 @@ const StatusActionButtons = {
}, },
doActionReal(button) { doActionReal(button) {
button button
.action(this.funcArg) .action?.(this.funcArg)
.then(() => this.$emit('onSuccess')) .then(() => this.$emit('onSuccess'))
.catch((err) => this.$emit('onError', err.error.error)) .catch((err) => this.$emit('onError', err.error.error))
}, },

View file

@ -121,8 +121,6 @@ export default {
return { return {
followRequestInProgress: false, followRequestInProgress: false,
muteExpiryAmount: 0,
muteExpiryUnit: 'minutes',
// Editable stuff // Editable stuff
editImage: false, editImage: false,
@ -158,7 +156,7 @@ export default {
computed: { computed: {
somethingToSave() { somethingToSave() {
if (this.newName !== this.user.name_unescaped) return true if (this.newName !== this.user.name_unescaped) return true
if (this.newBio !== unescape(this.user.description)) return true if (this.newBio !== ldUnescape(this.user.description)) return true
if (this.newAvatar !== null) return true if (this.newAvatar !== null) return true
if (this.newBanner !== null) return true if (this.newBanner !== null) return true
if (this.newActorType !== this.user.actor_type) return true if (this.newActorType !== this.user.actor_type) return true
@ -288,17 +286,17 @@ export default {
return 'note' in this.relationship return 'note' in this.relationship
}, },
muteExpiryAvailable() { muteExpiryAvailable() {
return this.user.mute_expires_at !== undefined return Object.hasOwn(this.user, 'mute_expires_at')
}, },
muteExpiry() { muteExpiry() {
return this.user.mute_expires_at == null return this.user.mute_expires_at === false
? this.$t('user_card.mute_expires_forever') ? this.$t('user_card.mute_expires_forever')
: this.$t('user_card.mute_expires_at', [ : this.$t('user_card.mute_expires_at', [
new Date(this.user.mute_expires_at).toLocaleString(), new Date(this.user.mute_expires_at).toLocaleString(),
]) ])
}, },
blockExpiryAvailable() { blockExpiryAvailable() {
return this.user.block_expires_at !== undefined return Object.hasOwn(this.user, 'block_expires_at')
}, },
blockExpiry() { blockExpiry() {
return this.user.block_expires_at == null return this.user.block_expires_at == null
@ -500,7 +498,7 @@ export default {
const user = this.$store.state.users.currentUser const user = this.$store.state.users.currentUser
this.newName = user.name_unescaped this.newName = user.name_unescaped
this.newBio = unescape(user.description) this.newBio = ldUnescape(user.description)
this.newAvatar = null this.newAvatar = null
this.newAvatarFile = null this.newAvatarFile = null
@ -530,8 +528,8 @@ export default {
show_birthday: !!this.newShowBirthday, show_birthday: !!this.newShowBirthday,
} }
if (this.actorType) { if (this.newActorType) {
params.actor_type = this.actorType params.actor_type = this.newActorType
} }
if (this.newAvatarFile !== null) { if (this.newAvatarFile !== null) {

View file

@ -208,22 +208,10 @@
</span> </span>
<span <span
v-if="user.actor_type === 'Group'" v-if="user.actor_type === 'Group'"
class="alert user-role" class="alert neutral user-role"
> >
{{ $t('user_card.group') }} {{ $t('user_card.group') }}
</span> </span>
<span
v-if="relationship.muting && muteExpiryAvailable"
class="alert neutral user-role"
>
{{ muteExpiry }}
</span>
<span
v-if="relationship.blocking && blockExpiryAvailable"
class="alert neutral user-role"
>
{{ blockExpiry }}
</span>
</template> </template>
</div> </div>
</div> </div>

View file

@ -1664,6 +1664,7 @@
"muted": "Muted", "muted": "Muted",
"mute_confirm_title": "Mute confirmation", "mute_confirm_title": "Mute confirmation",
"mute_confirm": "Do you really want to mute {user}?", "mute_confirm": "Do you really want to mute {user}?",
"mute_domain_confirm": "Do you really want to mute entire {domain}?",
"mute_confirm_accept_button": "Mute", "mute_confirm_accept_button": "Mute",
"mute_confirm_cancel_button": "Do not mute", "mute_confirm_cancel_button": "Do not mute",
"mute_or": "or", "mute_or": "or",

View file

@ -61,8 +61,16 @@ export const parseUser = (data) => {
output.screen_name = data.acct output.screen_name = data.acct
output.fqn = data.fqn output.fqn = data.fqn
output.statusnet_profile_url = data.url output.statusnet_profile_url = data.url
output.mute_expires_at = data.mute_expires_at
output.block_expires_at = data.block_expires_at if (Object.hasOwn(data, 'mute_expires_at')) {
output.mute_expires_at =
data.mute_expires_at == null ? false : data.mute_expires_at
}
if (Object.hasOwn(data, 'block_expires_at')) {
output.block_expires_at =
data.block_expires_at == null ? false : data.block_expires_at
}
// There's nothing else to get // There's nothing else to get
if (mastoShort) { if (mastoShort) {