Don't flood the progress bars when listing resources

This commit is contained in:
Dane Everitt 2020-04-12 16:08:29 -07:00
parent 7115209b60
commit b9239594ca
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -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;
});