Merge branch 'filter-fixes' into 'develop'
Filter fixes See merge request pleroma/pleroma-fe!2164
This commit is contained in:
commit
60e5c3b042
9 changed files with 16 additions and 13 deletions
0
changelog.d/filter-fixes.skip
Normal file
0
changelog.d/filter-fixes.skip
Normal file
|
|
@ -339,11 +339,6 @@ const conversation = {
|
||||||
canDive () {
|
canDive () {
|
||||||
return this.isTreeView && this.isExpanded
|
return this.isTreeView && this.isExpanded
|
||||||
},
|
},
|
||||||
focused () {
|
|
||||||
return (id) => {
|
|
||||||
return (this.isExpanded) && id === this.highlight
|
|
||||||
}
|
|
||||||
},
|
|
||||||
maybeHighlight () {
|
maybeHighlight () {
|
||||||
return this.isExpanded ? this.highlight : null
|
return this.isExpanded ? this.highlight : null
|
||||||
},
|
},
|
||||||
|
|
@ -406,6 +401,9 @@ const conversation = {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
isFocused (id) {
|
||||||
|
return (this.isExpanded) && id === this.highlight
|
||||||
|
},
|
||||||
getReplies (id) {
|
getReplies (id) {
|
||||||
return this.replies[id] || []
|
return this.replies[id] || []
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
:statusoid="status"
|
:statusoid="status"
|
||||||
:expandable="!isExpanded"
|
:expandable="!isExpanded"
|
||||||
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
||||||
:focused="focused(status.id)"
|
:focused="isFocused(status.id)"
|
||||||
:in-conversation="isExpanded"
|
:in-conversation="isExpanded"
|
||||||
:highlight="getHighlight()"
|
:highlight="getHighlight()"
|
||||||
:replies="getReplies(status.id)"
|
:replies="getReplies(status.id)"
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
:pinned-status-ids-object="pinnedStatusIdsObject"
|
:pinned-status-ids-object="pinnedStatusIdsObject"
|
||||||
:profile-user-id="profileUserId"
|
:profile-user-id="profileUserId"
|
||||||
|
|
||||||
:focused="focused"
|
:is-focused-function="isFocused"
|
||||||
:get-replies="getReplies"
|
:get-replies="getReplies"
|
||||||
:highlight="maybeHighlight"
|
:highlight="maybeHighlight"
|
||||||
:set-highlight="setHighlight"
|
:set-highlight="setHighlight"
|
||||||
|
|
@ -199,7 +199,7 @@
|
||||||
:statusoid="status"
|
:statusoid="status"
|
||||||
:expandable="!isExpanded"
|
:expandable="!isExpanded"
|
||||||
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
||||||
:focused="focused(status.id)"
|
:focused="isFocused(status.id)"
|
||||||
:in-conversation="isExpanded"
|
:in-conversation="isExpanded"
|
||||||
:highlight="getHighlight()"
|
:highlight="getHighlight()"
|
||||||
:replies="getReplies(status.id)"
|
:replies="getReplies(status.id)"
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,8 @@ const FilteringTab = {
|
||||||
date.getFullYear(),
|
date.getFullYear(),
|
||||||
'-',
|
'-',
|
||||||
fmt.format(date.getMonth() + 1),
|
fmt.format(date.getMonth() + 1),
|
||||||
|
'-',
|
||||||
|
fmt.format(date.getDate()),
|
||||||
'T',
|
'T',
|
||||||
fmt.format(date.getHours()),
|
fmt.format(date.getHours()),
|
||||||
':',
|
':',
|
||||||
|
|
|
||||||
|
|
@ -313,6 +313,7 @@ const Status = {
|
||||||
(relationshipReblog && relationshipReblog.muting)
|
(relationshipReblog && relationshipReblog.muting)
|
||||||
},
|
},
|
||||||
shouldNotMute () {
|
shouldNotMute () {
|
||||||
|
if (this.isFocused) return true
|
||||||
const { status } = this
|
const { status } = this
|
||||||
const { reblog } = status
|
const { reblog } = status
|
||||||
return (
|
return (
|
||||||
|
|
@ -535,6 +536,7 @@ const Status = {
|
||||||
this.controlledToggleThreadDisplay()
|
this.controlledToggleThreadDisplay()
|
||||||
},
|
},
|
||||||
scrollIfHighlighted (highlightId) {
|
scrollIfHighlighted (highlightId) {
|
||||||
|
if (this.$el.getBoundingClientRect == null) return
|
||||||
const id = highlightId
|
const id = highlightId
|
||||||
if (this.status.id === id) {
|
if (this.status.id === id) {
|
||||||
const rect = this.$el.getBoundingClientRect()
|
const rect = this.$el.getBoundingClientRect()
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const ThreadTree = {
|
||||||
pinnedStatusIdsObject: Object,
|
pinnedStatusIdsObject: Object,
|
||||||
profileUserId: String,
|
profileUserId: String,
|
||||||
|
|
||||||
focused: Function,
|
isFocusedFunction: Function,
|
||||||
highlight: String,
|
highlight: String,
|
||||||
getReplies: Function,
|
getReplies: Function,
|
||||||
setHighlight: Function,
|
setHighlight: Function,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
:statusoid="status"
|
:statusoid="status"
|
||||||
:expandable="!isExpanded"
|
:expandable="!isExpanded"
|
||||||
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
:show-pinned="pinnedStatusIdsObject && pinnedStatusIdsObject[status.id]"
|
||||||
:focused="focused(status.id)"
|
:focused="isFocusedFunction(status.id)"
|
||||||
:in-conversation="isExpanded"
|
:in-conversation="isExpanded"
|
||||||
:highlight="highlight"
|
:highlight="highlight"
|
||||||
:replies="getReplies(status.id)"
|
:replies="getReplies(status.id)"
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
:pinned-status-ids-object="pinnedStatusIdsObject"
|
:pinned-status-ids-object="pinnedStatusIdsObject"
|
||||||
:profile-user-id="profileUserId"
|
:profile-user-id="profileUserId"
|
||||||
|
|
||||||
:focused="focused"
|
:is-focused-function="isFocusedFunction"
|
||||||
:get-replies="getReplies"
|
:get-replies="getReplies"
|
||||||
:highlight="highlight"
|
:highlight="highlight"
|
||||||
:set-highlight="setHighlight"
|
:set-highlight="setHighlight"
|
||||||
|
|
|
||||||
|
|
@ -439,7 +439,7 @@
|
||||||
"import_failure": "The selected file is not a supported Pleroma filter.",
|
"import_failure": "The selected file is not a supported Pleroma filter.",
|
||||||
"help": {
|
"help": {
|
||||||
"word": "Simple and RegExp filters test against post's content and subject.",
|
"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": "Regex variants are more advanced and use {link} to match instead of simple substring search.",
|
||||||
"regexp_link": "Regular Expressions",
|
"regexp_link": "Regular Expressions",
|
||||||
"regexp_url": "https://en.wikipedia.org/wiki/Regular_expression"
|
"regexp_url": "https://en.wikipedia.org/wiki/Regular_expression"
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ export const muteFilterHits = (muteFilters, status) => {
|
||||||
if (expires !== null && expires < Date.now()) return false
|
if (expires !== null && expires < Date.now()) return false
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'word': {
|
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 }
|
return { hide, name }
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue