blob: 31890249f41891ab0c91cb8535c6b0cd2e86d9fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
<script>
import { GlDropdownItem } from '@gitlab/ui';
import { MountingPortal } from 'portal-vue';
import { s__ } from '~/locale';
import AbuseCategorySelector from '~/abuse_reports/components/abuse_category_selector.vue';
export default {
name: 'ReportAbuseDropdownItem',
components: {
GlDropdownItem,
MountingPortal,
AbuseCategorySelector,
},
i18n: {
reportAbuse: s__('ReportAbuse|Report abuse to administrator'),
},
data() {
return {
open: false,
};
},
methods: {
openDrawer() {
this.open = true;
},
closeDrawer() {
this.open = false;
},
},
};
</script>
<template>
<span>
<gl-dropdown-item @click="openDrawer">{{ $options.i18n.reportAbuse }}</gl-dropdown-item>
<mounting-portal mount-to="#js-report-abuse-drawer" name="abuse-category-selector" append>
<abuse-category-selector :show-drawer="open" @close-drawer="closeDrawer" />
</mounting-portal>
</span>
</template>
|