mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-22 03:56:42 +00:00
I messed up
This commit is contained in:
26
frontend/src/bootstrap.js
vendored
26
frontend/src/bootstrap.js
vendored
@@ -1,8 +1,34 @@
|
||||
// imports
|
||||
import Vue from 'vue';
|
||||
import VueI18n from 'vue-i18n'
|
||||
import * as uiv from 'uiv';
|
||||
|
||||
// export jquery for others scripts to use
|
||||
window.$ = window.jQuery = require('jquery');
|
||||
|
||||
// axios
|
||||
window.axios = require('axios');
|
||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
|
||||
// CSRF
|
||||
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');
|
||||
}
|
||||
|
||||
// admin stuff
|
||||
require('jquery-ui');
|
||||
require('bootstrap');
|
||||
|
||||
require('./dist/js/adminlte');
|
||||
require('overlayscrollbars');
|
||||
|
||||
// vue
|
||||
window.vuei18n = VueI18n;
|
||||
window.uiv =uiv;
|
||||
Vue.use(vuei18n);
|
||||
Vue.use(uiv);
|
||||
window.Vue = Vue;
|
||||
|
Reference in New Issue
Block a user