Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « merge_requests « projects « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 25a70121d681a61699be8f17b62e26a4f26d7875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Vue from 'vue';
import ReportAbuseDropdownItem from './components/report_abuse_dropdown_item.vue';

export const initReportAbuse = () => {
  const el = document.getElementById('js-report-abuse-dropdown-item');

  if (!el) return false;

  const { reportAbusePath, reportedUserId, reportedFromUrl } = el.dataset;

  return new Vue({
    el,
    provide: { reportAbusePath, reportedUserId, reportedFromUrl },
    render(createElement) {
      return createElement(ReportAbuseDropdownItem);
    },
  });
};