debian-mirror-gitlab/app/assets/javascripts/boards/config_toggle.js
2022-04-04 11:22:00 +05:30

25 lines
557 B
JavaScript

import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import ConfigToggle from './components/config_toggle.vue';
export default () => {
const el = document.querySelector('.js-board-config');
if (!el) {
return;
}
// eslint-disable-next-line no-new
new Vue({
el,
name: 'ConfigToggleRoot',
render(h) {
return h(ConfigToggle, {
props: {
canAdminList: parseBoolean(el.dataset.canAdminList),
hasScope: parseBoolean(el.dataset.hasScope),
},
});
},
});
};