2018-05-09 12:01:36 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import BadgeSettings from '~/badges/components/badge_settings.vue';
|
|
|
|
import store from '~/badges/store';
|
|
|
|
|
2021-03-08 18:12:59 +05:30
|
|
|
export default (kind) => {
|
2018-05-09 12:01:36 +05:30
|
|
|
const badgeSettingsElement = document.getElementById('badge-settings');
|
|
|
|
|
|
|
|
store.dispatch('loadBadges', {
|
|
|
|
kind,
|
|
|
|
apiEndpointUrl: badgeSettingsElement.dataset.apiEndpointUrl,
|
|
|
|
docsUrl: badgeSettingsElement.dataset.docsUrl,
|
|
|
|
});
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el: badgeSettingsElement,
|
|
|
|
store,
|
|
|
|
components: {
|
|
|
|
BadgeSettings,
|
|
|
|
},
|
|
|
|
render(createElement) {
|
|
|
|
return createElement(BadgeSettings);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|