debian-mirror-gitlab/app/assets/javascripts/registry/settings/registry_settings_bundle.js

41 lines
983 B
JavaScript
Raw Normal View History

2020-01-01 13:55:28 +05:30
import Vue from 'vue';
2020-03-13 15:44:24 +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-13 15:44:24 +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-02-22 17:27:13 +05:30
const {
isAdmin,
enableHistoricEntries,
projectPath,
adminSettingsPath,
tagsRegexHelpPagePath,
} = 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: {
isAdmin: parseBoolean(isAdmin),
enableHistoricEntries: parseBoolean(enableHistoricEntries),
2021-02-22 17:27:13 +05:30
projectPath,
adminSettingsPath,
tagsRegexHelpPagePath,
2021-01-03 14:25:43 +05:30
},
2020-01-01 13:55:28 +05:30
render(createElement) {
return createElement('registry-settings-app', {});
},
});
};