aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/import.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-09-16 20:28:59 -0700
committerAlex Yatskov <alex@foosoft.net>2016-09-16 20:28:59 -0700
commitc05f7a7c1cb9f25e3658ced51aefd61233f65bd3 (patch)
treed0c147a300f02244b0172776e11acbf864d817de /ext/bg/js/import.js
parentdc273c0c73dd39e8cad45e591b02231cb2cbed8c (diff)
Work on progress bar
Diffstat (limited to 'ext/bg/js/import.js')
-rw-r--r--ext/bg/js/import.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/bg/js/import.js b/ext/bg/js/import.js
index ebc7c7be..0601cb9f 100644
--- a/ext/bg/js/import.js
+++ b/ext/bg/js/import.js
@@ -17,9 +17,13 @@
*/
-function api_setProgress({state, progress}) {
- const str = `${progress}%`;
- $('.progress-bar').css('width', str).text(str);
+function api_setProgress(progress) {
+ $('.progress-bar').css('width', `${progress}%`);
+
+ if (progress === 100.0) {
+ $('.progress').hide();
+ $('.alert').show();
+ }
}
chrome.runtime.onMessage.addListener(({action, params}, sender, callback) => {