don't use sss inside service because otherwice vite will eat your face
This commit is contained in:
parent
c087e91a15
commit
671e975364
3 changed files with 12 additions and 7 deletions
|
|
@ -16,6 +16,7 @@ import generateProfileLink from 'src/services/user_profile_link_generator/user_p
|
||||||
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
|
||||||
import { muteFilterHits } from '../../services/status_parser/status_parser.js'
|
import { muteFilterHits } from '../../services/status_parser/status_parser.js'
|
||||||
import { unescape, uniqBy } from 'lodash'
|
import { unescape, uniqBy } from 'lodash'
|
||||||
|
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import {
|
import {
|
||||||
|
|
@ -219,7 +220,10 @@ const Status = {
|
||||||
return !!this.currentUser
|
return !!this.currentUser
|
||||||
},
|
},
|
||||||
muteFilterHits () {
|
muteFilterHits () {
|
||||||
return muteFilterHits(this.status)
|
return muteFilterHits(
|
||||||
|
Object.values(useServerSideStorageStore().prefsStorage.simple.muteFilters),
|
||||||
|
this.status
|
||||||
|
)
|
||||||
},
|
},
|
||||||
botStatus () {
|
botStatus () {
|
||||||
return this.status.user.actor_type === 'Service'
|
return this.status.user.actor_type === 'Service'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import apiService from '../services/api/api.service.js'
|
import apiService from '../services/api/api.service.js'
|
||||||
|
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isStatusNotification,
|
isStatusNotification,
|
||||||
|
|
@ -112,7 +113,11 @@ export const notifications = {
|
||||||
commit('updateNotificationsMinMaxId', notification.id)
|
commit('updateNotificationsMinMaxId', notification.id)
|
||||||
commit('addNewNotifications', { notifications: [notification] })
|
commit('addNewNotifications', { notifications: [notification] })
|
||||||
|
|
||||||
maybeShowNotification(store, notification)
|
maybeShowNotification(
|
||||||
|
store,
|
||||||
|
Object.values(useServerSideStorageStore().prefsStorage.simple.muteFilters),
|
||||||
|
notification
|
||||||
|
)
|
||||||
} else if (notification.seen) {
|
} else if (notification.seen) {
|
||||||
state.idStore[notification.id].seen = true
|
state.idStore[notification.id].seen = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,7 @@
|
||||||
import { useServerSideStorageStore } from 'src/stores/serverSideStorage'
|
export const muteFilterHits = (muteFilters, status) => {
|
||||||
|
|
||||||
export const muteFilterHits = (status) => {
|
|
||||||
const statusText = status.text.toLowerCase()
|
const statusText = status.text.toLowerCase()
|
||||||
const statusSummary = status.summary.toLowerCase()
|
const statusSummary = status.summary.toLowerCase()
|
||||||
|
|
||||||
const muteFilters = Object.values(useServerSideStorageStore().prefsStorage.simple.muteFilters)
|
|
||||||
|
|
||||||
return muteFilters.toSorted((a,b) => b.order - a.order).map(filter => {
|
return muteFilters.toSorted((a,b) => b.order - a.order).map(filter => {
|
||||||
const { hide, expires, name, value, type, enabled} = filter
|
const { hide, expires, name, value, type, enabled} = filter
|
||||||
if (!enabled) return false
|
if (!enabled) return false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue