From 786a96ecd97fcac283fa6af705f0d4341e48d011 Mon Sep 17 00:00:00 2001 From: JeLuF Date: Mon, 14 Aug 2023 21:27:22 +0200 Subject: [PATCH] type ahead search - use search prompt also for canary request - name prev/next button so that they can be directly accessed - search prompt, not path --- ui/easydiffusion/bucket_manager.py | 2 +- ui/index.html | 8 +++--- ui/media/js/main.js | 43 +++++++++++++++++++++--------- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/ui/easydiffusion/bucket_manager.py b/ui/easydiffusion/bucket_manager.py index c168f91a..93bbbcd6 100644 --- a/ui/easydiffusion/bucket_manager.py +++ b/ui/easydiffusion/bucket_manager.py @@ -104,7 +104,7 @@ def init(): from easydiffusion.easydb.mappings import GalleryImage images = db.query(GalleryImage).order_by(GalleryImage.time_created.desc()) if prompt != "": - images = images.filter(GalleryImage.path.like("%"+prompt+"%")) + images = images.filter(GalleryImage.prompt.like("%"+prompt+"%")) if model != "": images = images.filter(GalleryImage.use_stable_diffusion_model.like("%"+model+"%")) images = images.offset(page*images_per_page).limit(images_per_page) diff --git a/ui/index.html b/ui/index.html index f3f0574d..1819366e 100644 --- a/ui/index.html +++ b/ui/index.html @@ -519,14 +519,14 @@