2021-04-17 20:07:23 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
|
|
|
import ConfigToggle from './components/config_toggle.vue';
|
|
|
|
|
2021-11-11 11:23:49 +05:30
|
|
|
export default () => {
|
2021-04-17 20:07:23 +05:30
|
|
|
const el = document.querySelector('.js-board-config');
|
|
|
|
|
|
|
|
if (!el) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new Vue({
|
2021-04-17 20:07:23 +05:30
|
|
|
el,
|
2022-04-04 11:22:00 +05:30
|
|
|
name: 'ConfigToggleRoot',
|
2021-04-17 20:07:23 +05:30
|
|
|
render(h) {
|
|
|
|
return h(ConfigToggle, {
|
|
|
|
props: {
|
|
|
|
canAdminList: parseBoolean(el.dataset.canAdminList),
|
|
|
|
hasScope: parseBoolean(el.dataset.hasScope),
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|