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

index.js « abuse_report « admin « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8ff3e6901271a58c622a7c80eb2af8535bc9269b (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
import Vue from 'vue';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import AbuseReportApp from './components/abuse_report_app.vue';

export const initAbuseReportApp = () => {
  const el = document.querySelector('#js-abuse-reports-detail-view');

  if (!el) {
    return null;
  }

  const { abuseReportData } = el.dataset;
  const abuseReport = convertObjectPropsToCamelCase(JSON.parse(abuseReportData), {
    deep: true,
  });

  return new Vue({
    el,
    name: 'AbuseReportAppRoot',
    render: (createElement) =>
      createElement(AbuseReportApp, {
        props: {
          abuseReport,
        },
      }),
  });
};