debian-mirror-gitlab/app/assets/javascripts/projects/prune_objects_button.js

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

24 lines
579 B
JavaScript
Raw Normal View History

2023-04-23 21:23:45 +05:30
import Vue from 'vue';
import PruneUnreachableObjectsButton from './prune_unreachable_objects_button.vue';
export default (selector = '#js-project-prune-unreachable-objects-button') => {
const el = document.querySelector(selector);
if (!el) return;
const { pruneObjectsPath, pruneObjectsDocPath } = el.dataset;
// eslint-disable-next-line no-new
new Vue({
el,
render(createElement) {
return createElement(PruneUnreachableObjectsButton, {
props: {
pruneObjectsPath,
pruneObjectsDocPath,
},
});
},
});
};