sharkey/src/web/app/common/scripts/loading.js
syuilo 45e8331e26 🍣
Closes #12, #227 and #58
2017-03-18 20:05:11 +09:00

22 lines
374 B
JavaScript

const NProgress = require('nprogress');
NProgress.configure({
trickleSpeed: 500,
showSpinner: false
});
const root = document.getElementsByTagName('html')[0];
export default {
start: () => {
root.classList.add('progress');
NProgress.start();
},
done: () => {
root.classList.remove('progress');
NProgress.done();
},
set: val => {
NProgress.set(val);
}
};