diff --git a/static/koboldai.css b/static/koboldai.css index 14917fca..baeeb034 100644 --- a/static/koboldai.css +++ b/static/koboldai.css @@ -532,6 +532,10 @@ border-top-right-radius: var(--tabs_rounding); transform: translateY(22%); } +#upload_without_save_button { + transform: translateY(22%); +} + .settings_button[story_gamesaved="true"] { filter: brightness(40%); } diff --git a/static/koboldai.js b/static/koboldai.js index 311d361f..fb83143d 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -2183,7 +2183,18 @@ function upload_file(file_box) { for (file of fileList) { reader = new FileReader(); reader.onload = function (event) { - socket.emit("upload_file", {'filename': file.name, "data": event.target.result, 'upload_no_save': document.getElementById('upload_no_save').checked}); + socket.emit("upload_file", {'filename': file.name, "data": event.target.result, 'upload_no_save': false}); + }; + reader.readAsArrayBuffer(file); + } +} + +function upload_file_without_save(file_box) { + var fileList = file_box.files; + for (file of fileList) { + reader = new FileReader(); + reader.onload = function (event) { + socket.emit("upload_file", {'filename': file.name, "data": event.target.result, 'upload_no_save': true}); }; reader.readAsArrayBuffer(file); } diff --git a/templates/popups.html b/templates/popups.html index a882f591..83c2f011 100644 --- a/templates/popups.html +++ b/templates/popups.html @@ -11,16 +11,22 @@