X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=index.html;h=13fc62af92a00c9e5dc6f0f3e7da2848c0ae0b72;hb=04e147e46052f0912440c580cd52b0dc95d715f2;hp=185927fc1ee244dbdabd5dfe4880a93f96b91b5a;hpb=4afe65e479f8659f44671e0b88e5df7385481821;p=zombocom-ai diff --git a/index.html b/index.html index 185927f..13fc62a 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,7 @@ + @@ -46,10 +47,6 @@ -
- -
-
@@ -140,15 +137,22 @@ mute.addEventListener("click", () => { figcaption.appendChild(caption_text); figure.appendChild(img); figure.appendChild(figcaption); - images.appendChild(figure); + images.prepend(figure); }); zombo_form.addEventListener('submit', function(e) { e.preventDefault(); + /* Hide the form while generation is happening. */ + zombo_form.style.display = "none"; socket.emit('generate', {"prompt": prompt.value, "code": code.value}); prompt.value = ''; }); + socket.on('generation-done', () => { + /* Re-display the form now that image-generation is over. */ + zombo_form.style.display = "grid"; + }); + // TODO: Dynamically generate many different prompts here safety.addEventListener("click", () => { prompt.value = "Matte painting of a Samurai warrior";