summaryrefslogtreecommitdiff
path: root/src/client/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/scripts')
-rw-r--r--src/client/scripts/get-user-menu.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/client/scripts/get-user-menu.ts b/src/client/scripts/get-user-menu.ts
index 63c3ae43b6..cace2e1425 100644
--- a/src/client/scripts/get-user-menu.ts
+++ b/src/client/scripts/get-user-menu.ts
@@ -1,4 +1,4 @@
-import { faAt, faListUl, faEye, faEyeSlash, faBan, faPencilAlt, faComments, faUsers, faMicrophoneSlash, faPlug } from '@fortawesome/free-solid-svg-icons';
+import { faAt, faListUl, faEye, faEyeSlash, faBan, faPencilAlt, faComments, faUsers, faMicrophoneSlash, faPlug, faExclamationCircle } from '@fortawesome/free-solid-svg-icons';
import { faSnowflake, faEnvelope } from '@fortawesome/free-regular-svg-icons';
import { i18n } from '@/i18n';
import copyToClipboard from '@/scripts/copy-to-clipboard';
@@ -102,6 +102,12 @@ export function getUserMenu(user) {
});
}
+ async function reportAbuse() {
+ os.popup(await import('@/components/abuse-report-window.vue'), {
+ user: user,
+ }, {}, 'closed');
+ }
+
async function getConfirmed(text: string): Promise<boolean> {
const confirm = await os.dialog({
type: 'warning',
@@ -157,6 +163,12 @@ export function getUserMenu(user) {
action: toggleBlock
}]);
+ menu = menu.concat([null, {
+ icon: faExclamationCircle,
+ text: i18n.global.t('reportAbuse'),
+ action: reportAbuse
+ }]);
+
if (store.getters.isSignedIn && (store.state.i.isAdmin || store.state.i.isModerator)) {
menu = menu.concat([null, {
icon: faMicrophoneSlash,