Merge branch 'filter-fixes' into 'develop'

Filter fixes

See merge request pleroma/pleroma-fe!2164
This commit is contained in:
HJ 2025-05-13 15:10:37 +00:00
commit 60e5c3b042
9 changed files with 16 additions and 13 deletions

View file

View file

@ -339,11 +339,6 @@ const conversation = {
canDive () {
return this.isTreeView && this.isExpanded
},
focused () {
return (id) => {
return (this.isExpanded) && id === this.highlight
}
},
maybeHighlight () {
return this.isExpanded ? this.highlight : null
},
@ -406,6 +401,9 @@ const conversation = {
})
}
},
isFocused (id) {
return (this.isExpanded) && id === this.highlight
},
getReplies (id) {
return this.replies[id] || []
},

View file

@ -94,7 +94,7 @@
:statusoid="status"
:expandable="!isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:focused="focused(status.id)"
:focused="isFocused(status.id)"
:in-conversation="isExpanded"
:highlight="getHighlight()"
:replies="getReplies(status.id)"
@ -168,7 +168,7 @@
:pinned-status-ids-object="pinnedStatusIdsObject"
:profile-user-id="profileUserId"
:focused="focused"
:is-focused-function="isFocused"
:get-replies="getReplies"
:highlight="maybeHighlight"
:set-highlight="setHighlight"
@ -199,7 +199,7 @@
:statusoid="status"
:expandable="!isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:focused="focused(status.id)"
:focused="isFocused(status.id)"
:in-conversation="isExpanded"
:highlight="getHighlight()"
:replies="getReplies(status.id)"

View file

@ -112,6 +112,8 @@ const FilteringTab = {
date.getFullYear(),
'-',
fmt.format(date.getMonth() + 1),
'-',
fmt.format(date.getDate()),
'T',
fmt.format(date.getHours()),
':',

View file

@ -313,6 +313,7 @@ const Status = {
(relationshipReblog && relationshipReblog.muting)
},
shouldNotMute () {
if (this.isFocused) return true
const { status } = this
const { reblog } = status
return (
@ -535,6 +536,7 @@ const Status = {
this.controlledToggleThreadDisplay()
},
scrollIfHighlighted (highlightId) {
if (this.$el.getBoundingClientRect == null) return
const id = highlightId
if (this.status.id === id) {
const rect = this.$el.getBoundingClientRect()

View file

@ -26,7 +26,7 @@ const ThreadTree = {
pinnedStatusIdsObject: Object,
profileUserId: String,
focused: Function,
isFocusedFunction: Function,
highlight: String,
getReplies: Function,
setHighlight: Function,

View file

@ -7,7 +7,7 @@
:statusoid="status"
:expandable="!isExpanded"
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
:focused="focused(status.id)"
:focused="isFocusedFunction(status.id)"
:in-conversation="isExpanded"
:highlight="highlight"
:replies="getReplies(status.id)"
@ -52,7 +52,7 @@
:pinned-status-ids-object="pinnedStatusIdsObject"
:profile-user-id="profileUserId"
:focused="focused"
:is-focused-function="isFocusedFunction"
:get-replies="getReplies"
:highlight="highlight"
:set-highlight="setHighlight"

View file

@ -439,7 +439,7 @@
"import_failure": "The selected file is not a supported Pleroma filter.",
"help": {
"word": "Simple and RegExp filters test against post's content and subject.",
"user": "User filter matches full user handle (user@domain) in the following: author, reply-to and mentions",
"user": "User filter matches full user handle (user{'@'}domain) in the following: author, reply-to and mentions",
"regexp": "Regex variants are more advanced and use {link} to match instead of simple substring search.",
"regexp_link": "Regular Expressions",
"regexp_url": "https://en.wikipedia.org/wiki/Regular_expression"

View file

@ -13,7 +13,8 @@ export const muteFilterHits = (muteFilters, status) => {
if (expires !== null && expires < Date.now()) return false
switch (type) {
case 'word': {
if (statusText.includes(value) || statusSummary.includes(value)) {
const lowercaseValue = value.toLowerCase()
if (statusText.toLowerCase().includes(lowercaseValue) || statusSummary.toLowerCase().includes(lowercaseValue)) {
return { hide, name }
}
break