diff --git a/locales/en/translation.json b/locales/en/translation.json index 0da8f754..bd89f757 100644 --- a/locales/en/translation.json +++ b/locales/en/translation.json @@ -15,7 +15,8 @@ }, "show_more": "Show more", "show_less": "Show less", - "cw": "Media hidden" + "cw": "Media hidden", + "report": "Report {user}" } }, "accounts": { @@ -115,5 +116,10 @@ "title": "Settings", "language": "Language", "font_size": "Font size" + }, + "report": { + "title": "Report {user}", + "detail": "Detail", + "submit": "Submit" } } diff --git a/renderer/components/report/Report.tsx b/renderer/components/report/Report.tsx new file mode 100644 index 00000000..654b7e56 --- /dev/null +++ b/renderer/components/report/Report.tsx @@ -0,0 +1,43 @@ +import { Button, Label, Modal, Textarea } from 'flowbite-react' +import { Entity, MegalodonInterface } from 'megalodon' +import { FormattedMessage } from 'react-intl' + +type Props = { + open: boolean + close: () => void + status: Entity.Status + client: MegalodonInterface +} + +export default function Report(props: Props) { + const submit = async () => { + const comment = document.getElementById('comment') as HTMLTextAreaElement + await props.client.report(props.status.account.id, { + status_ids: [props.status.id], + comment: comment.value, + forward: true + }) + props.close() + } + + return ( + + + + + +
+
+ +