debian-mirror-gitlab/app/assets/javascripts/pages/groups/new/index.js

37 lines
883 B
JavaScript
Raw Normal View History

2021-09-04 01:27:46 +05:30
import Vue from 'vue';
2018-03-17 18:26:18 +05:30
import BindInOut from '~/behaviors/bind_in_out';
2021-03-11 19:13:27 +05:30
import initFilePickers from '~/file_pickers';
2018-03-17 18:26:18 +05:30
import Group from '~/group';
2021-09-04 01:27:46 +05:30
import { parseBoolean } from '~/lib/utils/common_utils';
import NewGroupCreationApp from './components/app.vue';
2019-12-26 22:10:19 +05:30
import GroupPathValidator from './group_path_validator';
2021-11-11 11:23:49 +05:30
import initToggleInviteMembers from './toggle_invite_members';
2018-03-17 18:26:18 +05:30
2021-04-29 21:17:54 +05:30
new GroupPathValidator(); // eslint-disable-line no-new
2021-01-29 00:20:46 +05:30
BindInOut.initAll();
initFilePickers();
2020-06-23 00:09:42 +05:30
2021-01-29 00:20:46 +05:30
new Group(); // eslint-disable-line no-new
2021-04-17 20:07:23 +05:30
2021-09-04 01:27:46 +05:30
function initNewGroupCreation(el) {
const { hasErrors } = el.dataset;
const props = {
hasErrors: parseBoolean(hasErrors),
};
return new Vue({
el,
render(h) {
return h(NewGroupCreationApp, { props });
},
});
2021-04-17 20:07:23 +05:30
}
2021-09-04 01:27:46 +05:30
const el = document.querySelector('.js-new-group-creation');
initNewGroupCreation(el);
2021-11-11 11:23:49 +05:30
initToggleInviteMembers();