feat: expand media discovery and AI workflows #8
@@ -102,7 +102,12 @@ export function Lightbox() {
|
||||
void getImageTags(selectedImage.id)
|
||||
.then(setImageTags)
|
||||
.catch(() => setImageTags([]));
|
||||
}, [selectedImage?.id, getImageTags]);
|
||||
}, [selectedImage?.id, selectedImage?.ai_tagged_at, getImageTags]);
|
||||
|
||||
// Reset the queued state once the worker finishes so the button is usable again
|
||||
useEffect(() => {
|
||||
if (selectedImage?.ai_tagged_at) setTaggingQueued(false);
|
||||
}, [selectedImage?.ai_tagged_at]);
|
||||
|
||||
useEffect(() => {
|
||||
const viewport = imageViewportRef.current;
|
||||
@@ -359,6 +364,7 @@ export function Lightbox() {
|
||||
{ratingPill(selectedImage.ai_rating).label}
|
||||
</span>
|
||||
) : null}
|
||||
{selectedImage.media_kind === "image" ? (
|
||||
<button
|
||||
className="rounded-md border border-white/10 bg-white/5 px-2 py-0.5 text-[10px] text-gray-400 transition-colors hover:bg-white/10 hover:text-white disabled:cursor-not-allowed disabled:opacity-40"
|
||||
disabled={!(taggerModelStatus?.ready ?? false) || taggingQueued}
|
||||
@@ -370,6 +376,7 @@ export function Lightbox() {
|
||||
>
|
||||
{taggingQueued ? "Queued" : "AI tags"}
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user