mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-11 14:40:46 +00:00
Update bootstrap/components js
This commit is contained in:
parent
4571b63f11
commit
8148f80c6b
2 changed files with 17 additions and 15 deletions
15
resources/assets/js/bootstrap.js
vendored
15
resources/assets/js/bootstrap.js
vendored
|
@ -1,22 +1,7 @@
|
||||||
window._ = require('lodash');
|
window._ = require('lodash');
|
||||||
window.Popper = require('popper.js').default;
|
window.Popper = require('popper.js').default;
|
||||||
import swal from 'sweetalert';
|
|
||||||
window.pixelfed = window.pixelfed || {};
|
window.pixelfed = window.pixelfed || {};
|
||||||
window.$ = window.jQuery = require('jquery');
|
window.$ = window.jQuery = require('jquery');
|
||||||
require('bootstrap');
|
require('bootstrap');
|
||||||
window.InfiniteScroll = require('infinite-scroll');
|
|
||||||
window.filesize = require('filesize');
|
|
||||||
window.typeahead = require('./lib/typeahead');
|
window.typeahead = require('./lib/typeahead');
|
||||||
window.Bloodhound = require('./lib/bloodhound');
|
window.Bloodhound = require('./lib/bloodhound');
|
||||||
window.Vue = require('vue');
|
|
||||||
import BootstrapVue from 'bootstrap-vue'
|
|
||||||
Vue.use(BootstrapVue);
|
|
||||||
window.axios = require('axios');
|
|
||||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
||||||
|
|
||||||
let token = document.head.querySelector('meta[name="csrf-token"]');
|
|
||||||
if (token) {
|
|
||||||
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
|
||||||
} else {
|
|
||||||
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
|
||||||
}
|
|
17
resources/assets/js/components.js
vendored
17
resources/assets/js/components.js
vendored
|
@ -1,3 +1,20 @@
|
||||||
|
window.Vue = require('vue');
|
||||||
|
import BootstrapVue from 'bootstrap-vue'
|
||||||
|
Vue.use(BootstrapVue);
|
||||||
|
|
||||||
|
window.InfiniteScroll = require('infinite-scroll');
|
||||||
|
window.filesize = require('filesize');
|
||||||
|
window.axios = require('axios');
|
||||||
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
|
import swal from 'sweetalert';
|
||||||
|
|
||||||
|
let token = document.head.querySelector('meta[name="csrf-token"]');
|
||||||
|
if (token) {
|
||||||
|
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
|
||||||
|
} else {
|
||||||
|
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
|
||||||
|
}
|
||||||
|
|
||||||
require('./components/localstorage');
|
require('./components/localstorage');
|
||||||
require('./components/likebutton');
|
require('./components/likebutton');
|
||||||
require('./components/commentform');
|
require('./components/commentform');
|
||||||
|
|
Loading…
Reference in a new issue