summaryrefslogtreecommitdiff
path: root/ext/bg/js/options-form.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/options-form.js')
-rw-r--r--ext/bg/js/options-form.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/bg/js/options-form.js b/ext/bg/js/options-form.js
index 983ef51d..1f64f8d0 100644
--- a/ext/bg/js/options-form.js
+++ b/ext/bg/js/options-form.js
@@ -164,7 +164,11 @@ function onDictionaryDelete() {
const dictControls = dictGroup.find('.dict-controls');
dictControls.hide();
- database().deleteDictionary(dictGroup.data('title')).then(() => {
+ const callback = (total, current) => {
+ dictProgress.find('div').css('width', `${current / total * 100.0}%`);
+ };
+
+ database().deleteDictionary(dictGroup.data('title'), callback).then(() => {
dictGroup.slideUp();
}).catch(error => {
dictError.show().find('span').text(error);