aboutsummaryrefslogtreecommitdiff
path: root/src_js/common.js
diff options
context:
space:
mode:
authorbozo.kopic <bozo@kopic.xyz>2021-12-18 21:31:37 +0100
committerbozo.kopic <bozo@kopic.xyz>2021-12-18 21:31:37 +0100
commit5bf1039a0ec97aab4236f6c96e1e96dc0caf5e78 (patch)
tree11aec11c35f71bc82774cc8e4f1b604026da6295 /src_js/common.js
parent0702d13263bf501c1db074ce1544e60b95161210 (diff)
frontend updatev0.3.1
Diffstat (limited to 'src_js/common.js')
-rw-r--r--src_js/common.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src_js/common.js b/src_js/common.js
index 6e164f9..bf1327a 100644
--- a/src_js/common.js
+++ b/src_js/common.js
@@ -17,6 +17,7 @@ let itemCounter = 0;
export async function calculate() {
+ r.set('calculating', true);
try {
const method = r.get('form', 'method');
const params = createCalculateParams();
@@ -35,6 +36,8 @@ export async function calculate() {
showNotification('success', 'New calculation available');
} catch (e) {
showNotification('error', e);
+ } finally {
+ r.set('calculating', false);
}
}