Sharkey/src/client/app/common/scripts/loading.ts
2019-01-27 19:41:41 +09:00

21 lines
374 B
TypeScript

import * as NProgress from '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);
}
};