diff options
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r-- | app/assets/javascripts/boards/boards_bundle.js.es6 | 1 | ||||
-rw-r--r-- | app/assets/javascripts/boards/vue_resource_interceptor.js.es6 | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/app/assets/javascripts/boards/boards_bundle.js.es6 b/app/assets/javascripts/boards/boards_bundle.js.es6 index 560a9a079bb..fbb05534ef6 100644 --- a/app/assets/javascripts/boards/boards_bundle.js.es6 +++ b/app/assets/javascripts/boards/boards_bundle.js.es6 @@ -7,6 +7,7 @@ //= require_tree ./mixins //= require ./components/board //= require ./components/new_list_dropdown +//= require ./vue_resource_interceptor $(() => { const $boardApp = document.getElementById('board-app'), diff --git a/app/assets/javascripts/boards/vue_resource_interceptor.js.es6 b/app/assets/javascripts/boards/vue_resource_interceptor.js.es6 new file mode 100644 index 00000000000..c6db7c75ea6 --- /dev/null +++ b/app/assets/javascripts/boards/vue_resource_interceptor.js.es6 @@ -0,0 +1,9 @@ +Vue.activeResources = 0; + +Vue.http.interceptors.push((request, next) => { + Vue.activeResources++; + + next((response) => { + Vue.activeResources--; + }); +}); |