浏览代码

fix Restore progress

w-e-w 1 年之前
父节点
当前提交
1a1205f601
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      javascript/ui.js

+ 3 - 2
javascript/ui.js

@@ -136,8 +136,7 @@ function showSubmitInterruptingPlaceholder(tabname) {
 function showRestoreProgressButton(tabname, show) {
 function showRestoreProgressButton(tabname, show) {
     var button = gradioApp().getElementById(tabname + "_restore_progress");
     var button = gradioApp().getElementById(tabname + "_restore_progress");
     if (!button) return;
     if (!button) return;
-
-    button.style.display = show ? "flex" : "none";
+    button.style.setProperty('display', show ? 'flex' : 'none', 'important');
 }
 }
 
 
 function submit() {
 function submit() {
@@ -209,6 +208,7 @@ function restoreProgressTxt2img() {
     var id = localGet("txt2img_task_id");
     var id = localGet("txt2img_task_id");
 
 
     if (id) {
     if (id) {
+        showSubmitInterruptingPlaceholder('txt2img');
         requestProgress(id, gradioApp().getElementById('txt2img_gallery_container'), gradioApp().getElementById('txt2img_gallery'), function() {
         requestProgress(id, gradioApp().getElementById('txt2img_gallery_container'), gradioApp().getElementById('txt2img_gallery'), function() {
             showSubmitButtons('txt2img', true);
             showSubmitButtons('txt2img', true);
         }, null, 0);
         }, null, 0);
@@ -223,6 +223,7 @@ function restoreProgressImg2img() {
     var id = localGet("img2img_task_id");
     var id = localGet("img2img_task_id");
 
 
     if (id) {
     if (id) {
+        showSubmitInterruptingPlaceholder('img2img');
         requestProgress(id, gradioApp().getElementById('img2img_gallery_container'), gradioApp().getElementById('img2img_gallery'), function() {
         requestProgress(id, gradioApp().getElementById('img2img_gallery_container'), gradioApp().getElementById('img2img_gallery'), function() {
             showSubmitButtons('img2img', true);
             showSubmitButtons('img2img', true);
         }, null, 0);
         }, null, 0);