1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-27 21:18:27 +09:00
misskey/src/client/scripts/loading.ts

22 lines
374 B
TypeScript
Raw Normal View History

import * as NProgress from 'nprogress';
2017-02-18 16:53:46 +09:00
NProgress.configure({
trickleSpeed: 500,
showSpinner: false
});
const root = document.getElementsByTagName('html')[0];
2017-03-18 20:05:11 +09:00
export default {
2017-02-18 16:53:46 +09:00
start: () => {
root.classList.add('progress');
NProgress.start();
},
done: () => {
root.classList.remove('progress');
NProgress.done();
},
set: val => {
NProgress.set(val);
}
};