Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7687060
follow_request_card.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
follow_request_card.js
View Options
import
BasicUserCard
from
'../basic_user_card/basic_user_card.vue'
import
{
notificationsFromStore
}
from
'../../services/notification_utils/notification_utils.js'
const
FollowRequestCard
=
{
props
:
[
'user'
],
components
:
{
BasicUserCard
},
methods
:
{
findFollowRequestNotificationId
()
{
const
notif
=
notificationsFromStore
(
this
.
$store
).
find
(
(
notif
)
=>
notif
.
from_profile
.
id
===
this
.
user
.
id
&&
notif
.
type
===
'follow_request'
)
return
notif
&&
notif
.
id
},
approveUser
()
{
this
.
$store
.
state
.
api
.
backendInteractor
.
approveUser
({
id
:
this
.
user
.
id
})
this
.
$store
.
dispatch
(
'removeFollowRequest'
,
this
.
user
)
const
notifId
=
this
.
findFollowRequestNotificationId
()
this
.
$store
.
dispatch
(
'markSingleNotificationAsSeen'
,
{
id
:
notifId
})
this
.
$store
.
dispatch
(
'updateNotification'
,
{
id
:
notifId
,
updater
:
notification
=>
{
notification
.
type
=
'follow'
}
})
},
denyUser
()
{
const
notifId
=
this
.
findFollowRequestNotificationId
()
this
.
$store
.
state
.
api
.
backendInteractor
.
denyUser
({
id
:
this
.
user
.
id
})
.
then
(()
=>
{
this
.
$store
.
dispatch
(
'dismissNotificationLocal'
,
{
id
:
notifId
})
this
.
$store
.
dispatch
(
'removeFollowRequest'
,
this
.
user
)
})
}
}
}
export
default
FollowRequestCard
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 3, 6:38 PM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
438018
Default Alt Text
follow_request_card.js (1 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment