mirror of
https://github.com/axeloz/filesharing.git
synced 2025-05-06 18:13:55 +02:00
38 lines
697 B
JavaScript
38 lines
697 B
JavaScript
import Alpine from 'alpinejs';
|
|
import { takeWhile } from 'lodash';
|
|
window.Alpine = Alpine;
|
|
|
|
import axios from 'axios';
|
|
window.axios = axios;
|
|
|
|
import moment from 'moment';
|
|
window.moment = moment;
|
|
moment().format();
|
|
|
|
|
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
|
|
|
window.axios.interceptors.response.use(function (response) {
|
|
return response;
|
|
}, function (error) {
|
|
|
|
// Authenticated user
|
|
if (error.response.status == 401) {
|
|
window.location.href = '/'
|
|
}
|
|
else {
|
|
return Promise.reject(error);
|
|
}
|
|
});
|
|
|
|
import Dropzone from "dropzone";
|
|
window.Dropzone = Dropzone;
|
|
import "dropzone/dist/dropzone.css";
|
|
|
|
|
|
import.meta.glob([
|
|
'../images/**',
|
|
]);
|
|
|
|
|
|
Alpine.start()
|