mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 10:50:23 +00:00
prevent Reload UI button/link from reloading the page when it's not yet ready
This commit is contained in:
@@ -395,7 +395,16 @@ function update_token_counter(button_id) {
|
||||
|
||||
function restart_reload(){
|
||||
document.body.innerHTML='<h1 style="font-family:monospace;margin-top:20%;color:lightgray;text-align:center;">Reloading...</h1>';
|
||||
setTimeout(function(){location.reload()},2000)
|
||||
|
||||
var requestPing = function(){
|
||||
requestGet("./internal/ping", {}, function(data){
|
||||
location.reload();
|
||||
}, function(){
|
||||
setTimeout(requestPing, 500);
|
||||
})
|
||||
}
|
||||
|
||||
setTimeout(requestPing, 2000);
|
||||
|
||||
return []
|
||||
}
|
||||
|
Reference in New Issue
Block a user