all over the place with comments and console statements but now properly chains all the calls for login (except translation may have an issue)

This commit is contained in:
2020-06-10 21:05:45 +00:00
parent c0fcecb3f8
commit 0a43e53ab7
25 changed files with 1966 additions and 976 deletions

View File

@@ -112,48 +112,48 @@ Vue.config.productionTip = false;
// AJAX LOADER INDICATOR
//
// Store a copy of the fetch function
let _oldFetch = fetch;
// let _oldFetch = fetch;
// Create our new version of the fetch function
window.fetch = function() {
// Create hooks
let fetchStart = new Event("fetchStart", {
view: document,
bubbles: true,
cancelable: false
});
let fetchEnd = new Event("fetchEnd", {
view: document,
bubbles: true,
cancelable: false
});
// // Create our new version of the fetch function
// window.fetch = function() {
// // Create hooks
// let fetchStart = new Event("fetchStart", {
// view: document,
// bubbles: true,
// cancelable: false
// });
// let fetchEnd = new Event("fetchEnd", {
// view: document,
// bubbles: true,
// cancelable: false
// });
// Pass the supplied arguments to the real fetch function
let fetchCall = _oldFetch.apply(this, arguments);
// // Pass the supplied arguments to the real fetch function
// let fetchCall = _oldFetch.apply(this, arguments);
// Trigger the fetchStart event
document.dispatchEvent(fetchStart);
// // Trigger the fetchStart event
// document.dispatchEvent(fetchStart);
fetchCall
.then(function() {
// Trigger the fetchEnd event
document.dispatchEvent(fetchEnd);
})
.catch(function() {
// Trigger the fetchEnd event
document.dispatchEvent(fetchEnd);
});
// fetchCall
// .then(function() {
// // Trigger the fetchEnd event
// document.dispatchEvent(fetchEnd);
// })
// .catch(function() {
// // Trigger the fetchEnd event
// document.dispatchEvent(fetchEnd);
// });
return fetchCall;
};
// return fetchCall;
// };
document.addEventListener("fetchStart", function() {
NProgress.start();
});
// document.addEventListener("fetchStart", function() {
// NProgress.start();
// });
document.addEventListener("fetchEnd", function() {
NProgress.done();
});
// document.addEventListener("fetchEnd", function() {
// NProgress.done();
// });
/////////////////////////////////////////////////////////////////
// FILTERS