Replace debug bar with clockwork
This commit is contained in:
parent
4252014d18
commit
f5ad9b9e11
5 changed files with 74 additions and 402 deletions
|
@ -23,7 +23,7 @@ http.interceptors.request.use(req => {
|
|||
});
|
||||
|
||||
http.interceptors.request.use(req => {
|
||||
if (!req.url?.endsWith('/resources') && (req.url?.indexOf('_debugbar') || -1) < 0) {
|
||||
if (!req.url?.endsWith('/resources')) {
|
||||
store.getActions().progress.startContinuous();
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ http.interceptors.request.use(req => {
|
|||
});
|
||||
|
||||
http.interceptors.response.use(resp => {
|
||||
if (!resp.request?.url?.endsWith('/resources') && (resp.request?.url?.indexOf('_debugbar') || -1) < 0) {
|
||||
if (!resp.request?.url?.endsWith('/resources')) {
|
||||
store.getActions().progress.setComplete();
|
||||
}
|
||||
|
||||
|
@ -42,18 +42,6 @@ http.interceptors.response.use(resp => {
|
|||
throw error;
|
||||
});
|
||||
|
||||
// If we have a phpdebugbar instance registered at this point in time go
|
||||
// ahead and route the response data through to it so things show up.
|
||||
// @ts-ignore
|
||||
if (typeof window.phpdebugbar !== 'undefined') {
|
||||
http.interceptors.response.use(response => {
|
||||
// @ts-ignore
|
||||
window.phpdebugbar.ajaxHandler.handle(response.request);
|
||||
|
||||
return response;
|
||||
});
|
||||
}
|
||||
|
||||
export default http;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue