33 lines
1 KiB
JavaScript
Vendored
33 lines
1 KiB
JavaScript
Vendored
// SweetAlert
|
|
import Swal from 'sweetalert2/dist/sweetalert2.js'
|
|
import GLightbox from 'glightbox'
|
|
|
|
// bootstrap styling
|
|
window.Swal = Swal.mixin({
|
|
customClass: {
|
|
confirmButton: 'btn btn-lg btn-success ms-3 me-3',
|
|
cancelButton: 'btn btn-lg btn-danger ms-3 me-3'
|
|
},
|
|
buttonsStyling: false
|
|
})
|
|
|
|
window._ = require('lodash')
|
|
|
|
/**
|
|
* We'll load the axios HTTP library which allows us to easily issue requests
|
|
* to our Laravel back-end. This library automatically handles sending the
|
|
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
|
*/
|
|
|
|
window.axios = require('axios')
|
|
|
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
|
|
let csrfToken = document.querySelector('meta[name="csrf-token"]')
|
|
if (csrfToken.getAttribute('content')) {
|
|
window.axios.defaults.headers.common['Authorization'] = `Bearer ${csrfToken.getAttribute('content')}`
|
|
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = csrfToken.getAttribute('content')
|
|
}
|
|
|
|
const glightbox = new GLightbox({
|
|
'selector': '.glightbox'
|
|
})
|