Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7686816
react_button.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1007 B
Referenced Files
None
Subscribers
None
react_button.js
View Options
import
Popover
from
'../popover/popover.vue'
import
{
mapGetters
}
from
'vuex'
const
ReactButton
=
{
props
:
[
'status'
],
data
()
{
return
{
filterWord
:
''
}
},
components
:
{
Popover
},
methods
:
{
addReaction
(
event
,
emoji
,
close
)
{
const
existingReaction
=
this
.
status
.
emoji_reactions
.
find
(
r
=>
r
.
name
===
emoji
)
if
(
existingReaction
&&
existingReaction
.
me
)
{
this
.
$store
.
dispatch
(
'unreactWithEmoji'
,
{
id
:
this
.
status
.
id
,
emoji
})
}
else
{
this
.
$store
.
dispatch
(
'reactWithEmoji'
,
{
id
:
this
.
status
.
id
,
emoji
})
}
close
()
}
},
computed
:
{
commonEmojis
()
{
return
[
'👍'
,
'😠'
,
'👀'
,
'😂'
,
'🔥'
]
},
emojis
()
{
if
(
this
.
filterWord
!==
''
)
{
return
this
.
$store
.
state
.
instance
.
emoji
.
filter
(
emoji
=>
emoji
.
displayText
.
includes
(
this
.
filterWord
))
}
return
this
.
$store
.
state
.
instance
.
emoji
||
[]
},
...
mapGetters
([
'mergedConfig'
])
}
}
export
default
ReactButton
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 3, 5:03 PM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
439099
Default Alt Text
react_button.js (1007 B)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment