From ff1af6b88892749bdfc4f252bb376f6a62ddd52b Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Sat, 1 Apr 2023 16:59:46 +0000 Subject: [PATCH] goofy ah --- gallery/static/js/main.js | 2 +- gallery/static/js/uploadTab.js | 4 ++++ gallery/templates/image.html | 2 +- gallery/templates/index.html | 1 - 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gallery/static/js/main.js b/gallery/static/js/main.js index 452587f..d974947 100644 --- a/gallery/static/js/main.js +++ b/gallery/static/js/main.js @@ -10,7 +10,7 @@ function loadOnView() { let image = lazyLoad[i]; if (image.getBoundingClientRect().top < window.innerHeight && image.getBoundingClientRect().bottom > 0) { if (!image.src) { - image.src = `/api/file/${image.getAttribute('data-src')}?r=thumb` + image.src = `/api/file/${image.getAttribute('data-src')}?r=thumb` // e=webp } } } diff --git a/gallery/static/js/uploadTab.js b/gallery/static/js/uploadTab.js index 3ff249e..3b02eed 100644 --- a/gallery/static/js/uploadTab.js +++ b/gallery/static/js/uploadTab.js @@ -109,6 +109,7 @@ function fileDropHandle(event) { fileUpload.files = event.dataTransfer.files; + fileDefault(); fileChanged(); } @@ -197,8 +198,11 @@ document.addEventListener('DOMContentLoaded', function() { fileDrop.addEventListener('dragleave', fileDefault, false); // Drop file into box fileDrop.addEventListener('drop', fileDropHandle, false); + // File upload change fileUpload.addEventListener('change', fileChanged, false); + // File upload clicked + fileUpload.addEventListener('click', fileDefault, false); // Submit form diff --git a/gallery/templates/image.html b/gallery/templates/image.html index 4fe1ed9..997ec6e 100644 --- a/gallery/templates/image.html +++ b/gallery/templates/image.html @@ -200,7 +200,7 @@ - + diff --git a/gallery/templates/index.html b/gallery/templates/index.html index c06ed8b..2adce93 100644 --- a/gallery/templates/index.html +++ b/gallery/templates/index.html @@ -13,7 +13,6 @@ {% endif %} - {% if images %}
Author{{ image.author_username }}{{ image.author_username }}
Upload date