Don't flood the progress bars when listing resources
This commit is contained in:
parent
7115209b60
commit
b9239594ca
1 changed files with 6 additions and 2 deletions
|
@ -12,13 +12,17 @@ const http: AxiosInstance = axios.create({
|
|||
});
|
||||
|
||||
http.interceptors.request.use(req => {
|
||||
store.getActions().progress.startContinuous();
|
||||
if (!req.url?.endsWith('/resources') && (req.url?.indexOf('_debugbar') || -1) < 0) {
|
||||
store.getActions().progress.startContinuous();
|
||||
}
|
||||
|
||||
return req;
|
||||
});
|
||||
|
||||
http.interceptors.response.use(resp => {
|
||||
store.getActions().progress.setComplete();
|
||||
if (!resp.request?.url?.endsWith('/resources') && (resp.request?.url?.indexOf('_debugbar') || -1) < 0) {
|
||||
store.getActions().progress.setComplete();
|
||||
}
|
||||
|
||||
return resp;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue