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

29 lines
866 B
JavaScript
Raw Normal View History

2021-03-11 19:13:27 +05:30
import { deprecatedCreateFlash as createFlash } from '~/flash';
import { __ } from '~/locale';
2018-03-17 18:26:18 +05:30
import initProjectVisibilitySelector from '../../../project_visibility';
import initProjectNew from '../../../projects/project_new';
2021-04-17 20:07:23 +05:30
initProjectVisibilitySelector();
initProjectNew.bindEvents();
2020-06-23 00:09:42 +05:30
2021-04-17 20:07:23 +05:30
import(
/* webpackChunkName: 'experiment_new_project_creation' */ '../../../projects/experiment_new_project_creation'
)
.then((m) => {
const el = document.querySelector('.js-experiment-new-project-creation');
2020-06-23 00:09:42 +05:30
2021-04-17 20:07:23 +05:30
if (!el) {
return;
}
2020-06-23 00:09:42 +05:30
2021-04-17 20:07:23 +05:30
const config = {
hasErrors: 'hasErrors' in el.dataset,
isCiCdAvailable: 'isCiCdAvailable' in el.dataset,
newProjectGuidelines: el.dataset.newProjectGuidelines,
};
m.default(el, config);
})
.catch(() => {
createFlash(__('An error occurred while loading project creation UI'));
});