2021-02-18 19:11:06 -05:00
|
|
|
import Vue from 'vue';
|
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
|
|
|
import ConfigToggle from './components/config_toggle.vue';
|
|
|
|
|
2021-03-23 11:09:28 -04:00
|
|
|
export default (boardsStore = undefined) => {
|
2021-02-18 19:11:06 -05:00
|
|
|
const el = document.querySelector('.js-board-config');
|
|
|
|
|
|
|
|
if (!el) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-03-23 11:09:28 -04:00
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new Vue({
|
2021-02-18 19:11:06 -05:00
|
|
|
el,
|
|
|
|
render(h) {
|
|
|
|
return h(ConfigToggle, {
|
|
|
|
props: {
|
|
|
|
boardsStore,
|
|
|
|
canAdminList: parseBoolean(el.dataset.canAdminList),
|
|
|
|
hasScope: parseBoolean(el.dataset.hasScope),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|