debian-mirror-gitlab/app/assets/javascripts/webhooks/index.js

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

26 lines
542 B
JavaScript
Raw Normal View History

2022-11-25 23:54:43 +05:30
import Vue from 'vue';
import FormUrlApp from './components/form_url_app.vue';
export default () => {
const el = document.querySelector('.js-vue-webhook-form');
if (!el) {
return null;
}
const { url: initialUrl, urlVariables } = el.dataset;
return new Vue({
el,
name: 'WebhookFormRoot',
render(createElement) {
return createElement(FormUrlApp, {
props: {
initialUrl,
initialUrlVariables: urlVariables ? JSON.parse(urlVariables) : undefined,
},
});
},
});
};