mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 20:13:08 +02:00
21 lines
374 B
TypeScript
21 lines
374 B
TypeScript
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);
|
|
}
|
|
};
|