Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F325834
extra_notifications.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
extra_notifications.js
View Options
import
{
mapGetters
}
from
'vuex'
import
{
mapState
as
mapPiniaState
}
from
'pinia'
import
{
useAnnouncementsStore
}
from
'src/stores/announcements'
import
{
library
}
from
'@fortawesome/fontawesome-svg-core'
import
{
faUserPlus
,
faComments
,
faBullhorn
}
from
'@fortawesome/free-solid-svg-icons'
import
{
useInterfaceStore
}
from
'src/stores/interface'
library
.
add
(
faUserPlus
,
faComments
,
faBullhorn
)
const
ExtraNotifications
=
{
computed
:
{
shouldShowChats
()
{
return
this
.
mergedConfig
.
showExtraNotifications
&&
this
.
mergedConfig
.
showChatsInExtraNotifications
&&
this
.
unreadChatCount
},
shouldShowAnnouncements
()
{
return
this
.
mergedConfig
.
showExtraNotifications
&&
this
.
mergedConfig
.
showAnnouncementsInExtraNotifications
&&
this
.
unreadAnnouncementCount
},
shouldShowFollowRequests
()
{
return
this
.
mergedConfig
.
showExtraNotifications
&&
this
.
mergedConfig
.
showFollowRequestsInExtraNotifications
&&
this
.
followRequestCount
},
hasAnythingToShow
()
{
return
this
.
shouldShowChats
||
this
.
shouldShowAnnouncements
||
this
.
shouldShowFollowRequests
},
shouldShowCustomizationTip
()
{
return
this
.
mergedConfig
.
showExtraNotificationsTip
&&
this
.
hasAnythingToShow
},
currentUser
()
{
return
this
.
$store
.
state
.
users
.
currentUser
},
...
mapGetters
([
'unreadChatCount'
,
'followRequestCount'
,
'mergedConfig'
]),
...
mapPiniaState
(
useAnnouncementsStore
,
{
unreadAnnouncementCount
:
'unreadAnnouncementCount'
})
},
methods
:
{
openNotificationSettings
()
{
return
useInterfaceStore
().
openSettingsModalTab
(
'notifications'
)
},
dismissConfigurationTip
()
{
return
this
.
$store
.
dispatch
(
'setOption'
,
{
name
:
'showExtraNotificationsTip'
,
value
:
false
})
}
}
}
export
default
ExtraNotifications
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 24, 4:25 AM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
96777
Default Alt Text
extra_notifications.js (1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment