summaryrefslogtreecommitdiff
path: root/client/js/api.js
diff options
context:
space:
mode:
authorrr- <rr-@sakuya.pl>2017-01-08 22:24:46 +0100
committerrr- <rr-@sakuya.pl>2017-01-08 22:29:05 +0100
commit43198daba313758096de936d64803624cb1fa241 (patch)
tree9c7684f041a066688d1b47ff453adf9295296cd4 /client/js/api.js
parente5f08b454c25fee153c5f4b66d8c84969b80bdab (diff)
client/posts: wrap with big progress
fixes #114
Diffstat (limited to 'client/js/api.js')
-rw-r--r--client/js/api.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/client/js/api.js b/client/js/api.js
index 21e2570..156823e 100644
--- a/client/js/api.js
+++ b/client/js/api.js
@@ -1,10 +1,10 @@
'use strict';
-const nprogress = require('nprogress');
const cookies = require('js-cookie');
const request = require('superagent');
const config = require('./config.js');
const events = require('./events.js');
+const progress = require('./util/progress.js');
class Api extends events.EventTarget {
constructor() {
@@ -259,18 +259,18 @@ class Api extends events.EventTarget {
}
if (!options.noProgress) {
- nprogress.start();
+ progress.start();
}
abortFunction = () => {
req.abort(); // does *NOT* call the callback passed in .end()
- nprogress.done();
+ progress.done();
reject(
new Error('The request was aborted due to user cancel.'));
};
req.end((error, response) => {
- nprogress.done();
+ progress.done();
abortFunction = () => {};
if (error) {
if (response && response.body) {