debian-mirror-gitlab/app/assets/javascripts/ci_secure_files/index.js

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

23 lines
635 B
JavaScript
Raw Normal View History

2022-05-07 20:08:51 +05:30
import Vue from 'vue';
2022-07-16 23:28:13 +05:30
import { parseBoolean } from '~/lib/utils/common_utils';
2022-05-07 20:08:51 +05:30
import SecureFilesList from './components/secure_files_list.vue';
export const initCiSecureFiles = (selector = '#js-ci-secure-files') => {
const containerEl = document.querySelector(selector);
const { projectId } = containerEl.dataset;
2022-07-16 23:28:13 +05:30
const { admin } = containerEl.dataset;
const { fileSizeLimit } = containerEl.dataset;
2022-05-07 20:08:51 +05:30
return new Vue({
el: containerEl,
provide: {
projectId,
2022-07-16 23:28:13 +05:30
admin: parseBoolean(admin),
fileSizeLimit,
2022-05-07 20:08:51 +05:30
},
render(createElement) {
return createElement(SecureFilesList);
},
});
};