fix opening reports
This commit is contained in:
parent
927f68418e
commit
aa6b390a6f
1 changed files with 3 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import { useEditStatusStore } from 'src/stores/editStatus.js'
|
import { useEditStatusStore } from 'src/stores/editStatus.js'
|
||||||
|
import { useReportsStore } from 'src/stores/reports.js'
|
||||||
const PRIVATE_SCOPES = new Set(['private', 'direct'])
|
const PRIVATE_SCOPES = new Set(['private', 'direct'])
|
||||||
const PUBLIC_SCOPES = new Set(['public', 'unlisted'])
|
const PUBLIC_SCOPES = new Set(['public', 'unlisted'])
|
||||||
export const BUTTONS = [{
|
export const BUTTONS = [{
|
||||||
|
|
@ -216,8 +217,8 @@ export const BUTTONS = [{
|
||||||
icon: 'flag',
|
icon: 'flag',
|
||||||
label: 'user_card.report',
|
label: 'user_card.report',
|
||||||
if: ({ loggedIn }) => loggedIn,
|
if: ({ loggedIn }) => loggedIn,
|
||||||
action ({ dispatch, status }) {
|
action ({ status }) {
|
||||||
dispatch('openUserReportingModal', { userId: status.user.id, statusIds: [status.id] })
|
return useReportsStore().openUserReportingModal({ userId: status.user.id, statusIds: [status.id] })
|
||||||
}
|
}
|
||||||
}].map(button => {
|
}].map(button => {
|
||||||
return Object.fromEntries(
|
return Object.fromEntries(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue