aboutsummaryrefslogtreecommitdiff
path: root/javascript/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/ui.js')
-rw-r--r--javascript/ui.js23
1 files changed, 19 insertions, 4 deletions
diff --git a/javascript/ui.js b/javascript/ui.js
index 18c9f891..3d079b3d 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) {
@@ -150,6 +159,14 @@ function submit() {
return res;
}
+function submit_txt2img_upscale() {
+ var res = submit(...arguments);
+
+ res[2] = selected_gallery_index();
+
+ return res;
+}
+
function submit_img2img() {
showSubmitButtons('img2img', false);
@@ -302,8 +319,6 @@ onAfterUiUpdate(function() {
});
json_elem.parentElement.style.display = "none";
-
- setupTokenCounters();
});
onOptionsChanged(function() {