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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.1 KiB
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';
2022-07-23 23:45:48 +05:30
import { initGroupNameAndPath } from '~/groups/create_edit_form';
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
2022-07-23 23:45:48 +05:30
new Group(); // eslint-disable-line no-new
initGroupNameAndPath();
2021-04-29 21:17:54 +05:30
2021-01-29 00:20:46 +05:30
BindInOut.initAll();
initFilePickers();
2020-06-23 00:09:42 +05:30
2021-09-04 01:27:46 +05:30
function initNewGroupCreation(el) {
2022-03-02 08:16:31 +05:30
const { hasErrors, verificationRequired, verificationFormUrl, subscriptionsUrl } = el.dataset;
2021-09-04 01:27:46 +05:30
const props = {
hasErrors: parseBoolean(hasErrors),
};
return new Vue({
el,
2022-03-02 08:16:31 +05:30
provide: {
verificationRequired: parseBoolean(verificationRequired),
verificationFormUrl,
subscriptionsUrl,
},
2021-09-04 01:27:46 +05:30
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();