pixelfed/resources/assets/js/admin.js
2024-03-14 05:17:18 -06:00

58 lines
1.7 KiB
JavaScript
Vendored
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

require('./polyfill');
window._ = require('lodash');
window.Popper = require('popper.js').default;
window.pixelfed = window.pixelfed || {};
window.$ = window.jQuery = require('jquery');
require('bootstrap');
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
require('readmore-js');
window.filesize = require('filesize');
window.Cookies = require('js-cookie');
require('jquery.scrollbar');
require('jquery-scroll-lock');
window.Chart = require('chart.js');
require('./lib/argon.js');
Chart.defaults.global.defaultFontFamily = "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif";
// fix bs4 custom paginators inherited from core app
Array.from(document.querySelectorAll('.pagination .page-link'))
.filter(el => el.textContent === '« Previous' || el.textContent === 'Next »')
.forEach(el => el.textContent = (el.textContent === 'Next »' ? '' :''));
Vue.component(
'admin-autospam',
require('./../components/admin/AdminAutospam.vue').default
);
Vue.component(
'admin-directory',
require('./../components/admin/AdminDirectory.vue').default
);
Vue.component(
'admin-reports',
require('./../components/admin/AdminReports.vue').default
);
Vue.component(
'admin-settings',
require('./../components/admin/AdminSettings.vue').default
);
Vue.component(
'instances-component',
require('./../components/admin/AdminInstances.vue').default
);
// Vue.component(
// 'instance-details-component',
// require('./../components/admin/AdminInstanceDetails.vue').default
// );
Vue.component(
'hashtag-component',
require('./../components/admin/AdminHashtags.vue').default
);