2021-02-12 07:09:02 -05:00
|
|
|
import { GlToast } from '@gitlab/ui';
|
2021-02-14 13:09:20 -05:00
|
|
|
import Vue from 'vue';
|
2021-02-12 07:09:02 -05:00
|
|
|
import IssuableByEmail from './components/issuable_by_email.vue';
|
|
|
|
|
|
|
|
Vue.use(GlToast);
|
|
|
|
|
|
|
|
export default () => {
|
|
|
|
const el = document.querySelector('.js-issueable-by-email');
|
|
|
|
|
|
|
|
if (!el) return null;
|
|
|
|
|
|
|
|
const {
|
|
|
|
initialEmail,
|
|
|
|
issuableType,
|
|
|
|
emailsHelpPagePath,
|
|
|
|
quickActionsHelpPath,
|
|
|
|
markdownHelpPath,
|
|
|
|
resetPath,
|
|
|
|
} = el.dataset;
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
|
|
|
provide: {
|
|
|
|
initialEmail,
|
|
|
|
issuableType,
|
|
|
|
emailsHelpPagePath,
|
|
|
|
quickActionsHelpPath,
|
|
|
|
markdownHelpPath,
|
|
|
|
resetPath,
|
|
|
|
},
|
|
|
|
render(h) {
|
|
|
|
return h(IssuableByEmail);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|