diff --git a/src/web/app/common/scripts/loading.js b/src/web/app/common/scripts/loading.js new file mode 100644 index 0000000000..fa7eafaf96 --- /dev/null +++ b/src/web/app/common/scripts/loading.js @@ -0,0 +1,21 @@ +const NProgress = require('nprogress'); +NProgress.configure({ + trickleSpeed: 500, + showSpinner: false +}); + +const root = document.getElementsByTagName('html')[0]; + +module.exports = { + start: () => { + root.classList.add('progress'); + NProgress.start(); + }, + done: () => { + root.classList.remove('progress'); + NProgress.done(); + }, + set: val => { + NProgress.set(val); + } +}; diff --git a/src/web/app/common/scripts/loading.ls b/src/web/app/common/scripts/loading.ls deleted file mode 100644 index 8ebede6db4..0000000000 --- a/src/web/app/common/scripts/loading.ls +++ /dev/null @@ -1,16 +0,0 @@ -NProgress = require \nprogress -NProgress.configure do - trickle-speed: 500ms - show-spinner: false - -root = document.get-elements-by-tag-name \html .0 - -module.exports = - start: ~> - root.class-list.add \progress - NProgress.start! - done: ~> - root.class-list.remove \progress - NProgress.done! - set: (val) ~> - NProgress.set val