aboutsummaryrefslogtreecommitdiff
path: root/javascript
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2024-02-01 22:34:29 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2024-02-01 22:34:29 +0300
commit9f3ba383143e117601666e4711ceeff2dfda2526 (patch)
tree5382cec85275767a2e67f19ffc736fc426340f7c /javascript
parentb594f518b7c3b1704b5bb0da34014372ed688f18 (diff)
Add "Interrupting..." placeholder.
Diffstat (limited to 'javascript')
-rw-r--r--javascript/ui.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/javascript/ui.js b/javascript/ui.js
index 3430b3fe..d5d85bb6 100644
--- a/javascript/ui.js
+++ b/javascript/ui.js
@@ -119,9 +119,18 @@ function create_submit_args(args) {
return res;
}
+function setSubmitButtonsVisibility(tabname, showInterrupt, showSkip, showInterrupting) {
+ gradioApp().getElementById(tabname + '_interrupt').style.display = showInterrupt ? "block" : "none";
+ gradioApp().getElementById(tabname + '_skip').style.display = showSkip ? "block" : "none";
+ gradioApp().getElementById(tabname + '_interrupting').style.display = showInterrupting ? "block" : "none";
+}
+
function showSubmitButtons(tabname, show) {
- gradioApp().getElementById(tabname + '_interrupt').style.display = show ? "none" : "block";
- gradioApp().getElementById(tabname + '_skip').style.display = show ? "none" : "block";
+ setSubmitButtonsVisibility(tabname, ! show, !show, false);
+}
+
+function showSubmitInterruptingPlaceholder(tabname) {
+ setSubmitButtonsVisibility(tabname, false, true, true);
}
function showRestoreProgressButton(tabname, show) {