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

index.js « profile « users « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c6b85489785a07d876e9c3fa2821bbba4d5079e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import Vue from 'vue';
import ReportAbuseButton from './components/report_abuse_button.vue';

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

  if (!el) return false;

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

  return new Vue({
    el,
    name: 'ReportAbuseButtonRoot',
    provide: {
      reportAbusePath,
      reportedUserId: parseInt(reportedUserId, 10),
      reportedFromUrl,
    },
    render(createElement) {
      return createElement(ReportAbuseButton);
    },
  });
};