Merge remote-tracking branch 'upstream/beta' into beta

This commit is contained in:
patriceac 2022-11-10 22:30:28 -08:00
commit 39b6c5d6f4
3 changed files with 19 additions and 5 deletions

View File

@ -7,7 +7,7 @@
<link rel="icon" type="image/png" href="/media/images/favicon-32x32.png" sizes="32x32">
<link rel="stylesheet" href="/media/css/fonts.css?v=1">
<link rel="stylesheet" href="/media/css/themes.css?v=2">
<link rel="stylesheet" href="/media/css/main.css?v=8">
<link rel="stylesheet" href="/media/css/main.css?v=9">
<link rel="stylesheet" href="/media/css/auto-save.css?v=5">
<link rel="stylesheet" href="/media/css/modifier-thumbnails.css?v=4">
<link rel="stylesheet" href="/media/css/fontawesome-all.min.css?v=1">
@ -323,7 +323,7 @@
<script src="media/js/inpainting-editor.js?v=1"></script>
<script src="media/js/image-modifiers.js?v=6"></script>
<script src="media/js/auto-save.js?v=7"></script>
<script src="media/js/main.js?v=10"></script>
<script src="media/js/main.js?v=11"></script>
<script src="media/js/themes.js?v=4"></script>
<script src="media/js/dnd.js?v=8"></script>
<script>

View File

@ -28,6 +28,7 @@ label {
font-size: 13px;
margin-bottom: 6px;
margin-top: 5px;
display: block;
}
.image_preview_container {
margin-top: 10pt;
@ -656,9 +657,9 @@ input::file-selector-button {
}
@media (min-width: 700px) {
#editor {
/* #editor {
max-width: 480px;
}
} */
.float-container {
padding: 20px;
}

View File

@ -1,7 +1,7 @@
"use strict" // Opt in to a restricted variant of JavaScript
const HEALTH_PING_INTERVAL = 5 // seconds
const MAX_INIT_IMAGE_DIMENSION = 768
const MIN_GPUS_TO_SHOW_SELECTION = 1
const MIN_GPUS_TO_SHOW_SELECTION = 2
const IMAGE_REGEX = new RegExp('data:image/[A-Za-z]+;base64')
@ -1460,4 +1460,17 @@ document.querySelectorAll(".tab").forEach(tab => {
})
})
window.addEventListener("beforeunload", function(e) {
const msg = "Unsaved pictures will be lost!";
let elementList = document.getElementsByClassName("imageTaskContainer");
if (elementList.length != 0) {
e.preventDefault();
(e || window.event).returnValue = msg;
return msg;
} else {
return true;
}
});
createCollapsibles()