How to use the nprogress.done function in nprogress

To help you get started, we’ve selected a few nprogress examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IoT-Technology / Groza / ui / src / permission.js View on Github external
router.afterEach(() => {
  NProgress.done() // finish progress bar
})
github mingdev123 / vue-admin / src / router / index.js View on Github external
router.beforeEach((to, from, next) => {
  if (from.path !== '/') {
    NProgress.done().start()
  }

  const isLogin = Store.getters[GET_IS_LOGIN]
  const auth = to.meta.auth

  if (auth === false || auth === 'false') {
    // 不需要验证的
    next()
  } else {
    // 已经登录的继续执行,没登录就跑到登录页面中去
    isLogin ? next() : router.replace(UserLogin.path)
  }
})
github artiely / element-admin / src / router / index.js View on Github external
router.afterEach(() => {
  NProgress.done() // finish progress bar
})
export default router
github samdenty / injectify / interface / src / socket-io / index.js View on Github external
socket.on(`user:projects`, data => {
    console.log(`%c[websocket] ` + `%cuser:projects =>`, `color: #ef5350`, `color:  #FF9800`, data)
    dispatch(Actions.setProjects(data))
    if (state().selectedProject.name && state().page) {
      socket.emit(`project:read`, {
        project: state().selectedProject.name,
        page: state().page
      })
    } else {
      NProgress.done()
    }
  })
github sishenhei7 / react-blog / src / components / layout.js View on Github external
getBlog().then(json => {
				const data = getList(json);
				this.setState({
					blogList: data
				});
				NProgress.done();
				sessionStorage.setItem('blogListData', JSON.stringify(data));
			});
		} else {
github adeira / relay-example / src / pages / _app.js View on Github external
handleRouteChangeComplete = () => {
    NProgress.done();
  };
github alitajs / ant-design-plus / packages / antd-plus-site / gatsby-browser.js View on Github external
export const onRouteUpdate = () => {
  NProgress.done(true);
};
github async-labs / saas / book / 6-begin / app / pages / your-settings.tsx View on Github external
const { currentUser } = this.props.store;

    const { newName, newAvatarUrl } = this.state;

    if (!newName) {
      notify('Name is required');
      return;
    }

    NProgress.start();

    try {
      this.setState({ disabled: true });

      await currentUser.updateProfile({ name: newName, avatarUrl: newAvatarUrl });
      NProgress.done();
      notify('You successfully updated your profile.');
    } catch (error) {
      NProgress.done();
      notify(error);
    } finally {
      this.setState({ disabled: false });
    }
  };