added spinner and check input

This commit is contained in:
andrea.terzani
2024-11-05 12:32:18 +01:00
parent f71948e888
commit c842ec45e2
7 changed files with 101 additions and 23 deletions

View File

@@ -20,6 +20,10 @@ import '@/assets/styles.scss';
import '@/assets/tailwind.css';
import { config } from 'md-editor-v3';
import { LoadingStore } from './stores/LoadingStore.js';
config({
@@ -53,6 +57,9 @@ var auth = createAuth({
});
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL;//'http://localhost:8081'///
console.log(import.meta.env.VITE_BACKEND_URL);
const app = createApp(App);
@@ -78,3 +85,21 @@ app.use(auth);
app.component('BlockViewer', BlockViewer);
app.mount('#app');
const loadingStore = LoadingStore()
axios.interceptors.request.use(function (config) {
loadingStore.another_loading = true;
return config
}, function (error) {
return Promise.reject(error);
});
axios.interceptors.response.use(function (response) {
loadingStore.another_loading = false;
return response;
}, function (error) {
return Promise.reject(error);
});