aboutsummaryrefslogtreecommitdiffstats
path: root/javascript
diff options
context:
space:
mode:
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) {