debian-mirror-gitlab/app/assets/javascripts/registry/list/index.js

45 lines
1.1 KiB
JavaScript
Raw Normal View History

2018-03-17 18:26:18 +05:30
import Vue from 'vue';
import registryApp from './components/app.vue';
2020-01-01 13:55:28 +05:30
import Translate from '~/vue_shared/translate';
2018-03-17 18:26:18 +05:30
Vue.use(Translate);
2020-03-09 13:42:32 +05:30
export default () => {
const el = document.getElementById('js-vue-registry-images');
if (!el) {
return null;
}
return new Vue({
el,
2018-12-13 13:39:08 +05:30
components: {
registryApp,
},
data() {
2020-03-09 13:42:32 +05:30
const { dataset } = el;
2018-12-13 13:39:08 +05:30
return {
2019-12-21 20:55:43 +05:30
registryData: {
endpoint: dataset.endpoint,
characterError: Boolean(dataset.characterError),
helpPagePath: dataset.helpPagePath,
noContainersImage: dataset.noContainersImage,
containersErrorImage: dataset.containersErrorImage,
repositoryUrl: dataset.repositoryUrl,
isGroupPage: dataset.isGroupPage,
personalAccessTokensHelpLink: dataset.personalAccessTokensHelpLink,
registryHostUrlWithPort: dataset.registryHostUrlWithPort,
twoFactorAuthHelpLink: dataset.twoFactorAuthHelpLink,
},
2018-12-13 13:39:08 +05:30
};
},
render(createElement) {
return createElement('registry-app', {
props: {
2019-12-21 20:55:43 +05:30
...this.registryData,
2018-12-13 13:39:08 +05:30
},
});
},
});
2020-03-09 13:42:32 +05:30
};