debian-mirror-gitlab/app/assets/javascripts/pages/projects/jobs/index/index.js
2021-03-11 19:13:27 +05:30

19 lines
476 B
JavaScript

import Vue from 'vue';
import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
document.addEventListener('DOMContentLoaded', () => {
const remainingTimeElements = document.querySelectorAll('.js-remaining-time');
remainingTimeElements.forEach(
(el) =>
new Vue({
el,
render(h) {
return h(GlCountdown, {
props: {
endDateString: el.dateTime,
},
});
},
}),
);
});