mirror of
https://github.com/lkwq007/stablediffusion-infinity.git
synced 2025-01-07 03:16:54 +08:00
Update toolbar
This commit is contained in:
parent
9f414631ef
commit
180a93bcf5
@ -4,11 +4,11 @@
|
||||
<meta charset="utf-8">
|
||||
<link rel="icon" type="image/x-icon" href="./favicon.png">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/lkwq007/stablediffusion-infinity@v0.1.1/css/w2ui.min.css">
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/lkwq007/stablediffusion-infinity@v0.1.1/js/w2ui.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/lkwq007/stablediffusion-infinity@v0.1.2/css/w2ui.min.css">
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/lkwq007/stablediffusion-infinity@v0.1.2/js/w2ui.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/gh/lkwq007/stablediffusion-infinity@v0.1.1/js/fabric.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/gh/lkwq007/stablediffusion-infinity@v0.1.1/js/toolbar.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/gh/lkwq007/stablediffusion-infinity@v0.1.2/js/fabric.min.js"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/gh/lkwq007/stablediffusion-infinity@v0.1.2/js/toolbar.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
|
||||
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
|
||||
|
@ -406,24 +406,27 @@ var toolbar=new w2toolbar({
|
||||
this.refresh();
|
||||
break;
|
||||
case "enable_history":
|
||||
let target=this.get(event.target);
|
||||
if(!target.checked)
|
||||
{
|
||||
w2utils.notify("Enable canvas history might increase resource usage / slow down the canvas ", {error:true,timeout:3000,where:query("#container")})
|
||||
window.postMessage(["click","history"],"*");
|
||||
}
|
||||
else
|
||||
{
|
||||
window.undo_redo_state.undo=false;
|
||||
window.undo_redo_state.redo=false;
|
||||
this.disable("undo","redo");
|
||||
}
|
||||
case "enable_img2img":
|
||||
case "use_correction":
|
||||
case "resize_check":
|
||||
case "enable_safety":
|
||||
case "use_seed":
|
||||
case "square_selection":
|
||||
let target=this.get(event.target);
|
||||
if(event.target=="enable_history")
|
||||
{
|
||||
if(!target.checked)
|
||||
{
|
||||
w2utils.notify("Enable canvas history might increase resource usage / slow down the canvas ", {error:true,timeout:3000,where:query("#container")})
|
||||
window.postMessage(["click","history"],"*");
|
||||
}
|
||||
else
|
||||
{
|
||||
window.undo_redo_state.undo=false;
|
||||
window.undo_redo_state.redo=false;
|
||||
this.disable("undo","redo");
|
||||
}
|
||||
}
|
||||
target.icon=target.checked?"fa-regular fa-square":"fa-solid fa-square-check";
|
||||
this.config_obj[event.target]=!target.checked;
|
||||
parent.config_obj=this.config_obj;
|
||||
|
Loading…
Reference in New Issue
Block a user