2020-01-01 13:55:28 +05:30
|
|
|
import Vue from 'vue';
|
2020-03-09 13:42:32 +05:30
|
|
|
import { GlToast } from '@gitlab/ui';
|
2020-01-01 13:55:28 +05:30
|
|
|
import Translate from '~/vue_shared/translate';
|
2021-01-03 14:25:43 +05:30
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
2020-01-01 13:55:28 +05:30
|
|
|
import RegistrySettingsApp from './components/registry_settings_app.vue';
|
2021-01-03 14:25:43 +05:30
|
|
|
import { apolloProvider } from './graphql/index';
|
2020-01-01 13:55:28 +05:30
|
|
|
|
2020-03-09 13:42:32 +05:30
|
|
|
Vue.use(GlToast);
|
2020-01-01 13:55:28 +05:30
|
|
|
Vue.use(Translate);
|
|
|
|
|
|
|
|
export default () => {
|
|
|
|
const el = document.getElementById('js-registry-settings');
|
|
|
|
if (!el) {
|
|
|
|
return null;
|
|
|
|
}
|
2021-01-03 14:25:43 +05:30
|
|
|
const { projectPath, isAdmin, adminSettingsPath, enableHistoricEntries } = el.dataset;
|
2020-01-01 13:55:28 +05:30
|
|
|
return new Vue({
|
|
|
|
el,
|
2021-01-03 14:25:43 +05:30
|
|
|
apolloProvider,
|
2020-01-01 13:55:28 +05:30
|
|
|
components: {
|
|
|
|
RegistrySettingsApp,
|
|
|
|
},
|
2021-01-03 14:25:43 +05:30
|
|
|
provide: {
|
|
|
|
projectPath,
|
|
|
|
isAdmin: parseBoolean(isAdmin),
|
|
|
|
adminSettingsPath,
|
|
|
|
enableHistoricEntries: parseBoolean(enableHistoricEntries),
|
|
|
|
},
|
2020-01-01 13:55:28 +05:30
|
|
|
render(createElement) {
|
|
|
|
return createElement('registry-settings-app', {});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|