debian-mirror-gitlab/app/assets/javascripts/admin/broadcast_messages/index.js
2023-03-04 22:38:38 +05:30

24 lines
656 B
JavaScript

import Vue from 'vue';
import BroadcastMessagesBase from './components/base.vue';
export default () => {
const el = document.querySelector('#js-broadcast-messages');
const { page, targetAccessLevelOptions, messagesCount, messages } = el.dataset;
return new Vue({
el,
name: 'BroadcastMessages',
provide: {
targetAccessLevelOptions: JSON.parse(targetAccessLevelOptions),
},
render(createElement) {
return createElement(BroadcastMessagesBase, {
props: {
page: Number(page),
messagesCount: Number(messagesCount),
messages: JSON.parse(messages),
},
});
},
});
};