How to use the nprogress.inc 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 austintoddj / canvas / resources / js / views / EditTag.vue View on Github external
.then(({ data }) => {
                    if (!isEmpty(data) && !isEmpty(data.data)) {
                        this.page += 1;
                        this.posts.push(...data.data);
                        $state.loaded();
                    } else {
                        $state.complete();
                    }

                    if (isEmpty($state)) {
                        NProgress.inc();
                    }
                })
                .catch(() => {
github austintoddj / canvas / resources / js / views / EditTopic.vue View on Github external
.then(({ data }) => {
                    this.topic = data;
                    NProgress.inc();
                })
                .catch(() => {
github austintoddj / canvas / resources / js / ui / views / AllTags.vue View on Github external
.then(({ data }) => {
                    this.tags = data;
                    NProgress.inc();
                })
                .catch(() => {
github austintoddj / canvas / resources / js / ui / views / ShowUser.vue View on Github external
.then(({ data }) => {
                    this.user = data;
                    NProgress.inc();
                })
                .catch(() => {
github huridocs / uwazi / app / react / App / LoadingProgressBar.js View on Github external
done: () => {
    if (isClient && NProgress) {
      loadingProgressBar.requests -= 1;
      if (loadingProgressBar.requests <= 0) {
        NProgress.done();
        return;
      }

      NProgress.inc(0.1);
    }
  }
};
github rr- / szurubooru / client / js / util / progress.js View on Github external
function done() {
    nesting--;
    if (nesting > 0) {
        nprogress.inc();
    } else {
        nprogress.done();
    }
}
github hua1995116 / musiccloudWebapp / src / main.js View on Github external
import Vue from 'vue';
import App from './App';
import Axios from './utils/axios';
import Router from 'vue-router';
import Music from './components/Music';
import Rank from './components/Rank';
import Station from './components/Station';
import Index from './components/Index';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';

import '../static/css/reset.css';
import 'vue-swipe/dist/vue-swipe.css';
import VueLazyload from 'vue-lazyload';

NProgress.inc(0.2);
NProgress.configure({ easing: 'ease', speed: 500, showSpinner: false });

Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: './static/img/error.jpg',
  loading: './static/img/loading.png',
  attempt: 1,
  listenEvents: [ 'scroll', 'mousewheel' ]
});
Vue.use(Router);

const routes = [{
  path: '/',
  component: Index
}, {
  path: '/music',
github openmultiplayer / web / frontend / src / pages / servers / index.tsx View on Github external
const handleSubmit = async (e: FormEvent) => {
    NProgress.start();
    e.preventDefault();
    const response = await fetch(API_SERVERS, {
      method: "POST",
      mode: "cors",
      headers: {
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ ip: value }),
    });
    NProgress.inc();
    if (response.status === 200) {
      const server = (await response.json()) as All;
      onAdd(server);
      toast.notify(
        `${server.core.hn} (${server.core.gm}) submitted to the index!`,
        {
          title: "Server Submitted!",
        }
      );
    } else {
      const error = (await response.json()) as { error: string };
      toast.notify(`Status ${response.statusText}: ${error?.error}`, {
        title: "Submission failed!",
        type: "error",
      });
    }
github jaredt67 / redux-nprogress / src / NProgressComponent.js View on Github external
componentWillReceiveProps(nextProps) {
    const { tasks } = nextProps;

    if (tasks === 0) {
      NProgress.done();
    } else {
      NProgress.inc();
    }
  }
github austintoddj / canvas / resources / js / views / PostList.vue View on Github external
.then(({ data }) => {
                        this.publishedCount = data.publishedCount;
                        this.draftCount = data.draftCount;

                        if (!isEmpty(data) && !isEmpty(data.posts.data)) {
                            this.page += 1;
                            this.posts.push(...data.posts.data);

                            $state.loaded();
                        } else {
                            $state.complete();
                        }

                        if (isEmpty($state)) {
                            NProgress.inc();
                        }
                    })
                    .catch(() => {