debian-mirror-gitlab/app/assets/javascripts/users/profile/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
566 B
JavaScript
Raw Normal View History

2023-03-17 16:20:25 +05:30
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,
2023-04-23 21:23:45 +05:30
name: 'ReportAbuseButtonRoot',
provide: {
reportAbusePath,
reportedUserId: parseInt(reportedUserId, 10),
reportedFromUrl,
},
2023-03-17 16:20:25 +05:30
render(createElement) {
return createElement(ReportAbuseButton);
},
});
};