Make library hide/reveal instant instead of rewriting the whole catalog.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-02 15:05:04 -05:00
co-authored by Cursor
parent e7298d9693
commit 4546aa5f61
6 changed files with 108 additions and 12 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ export default defineEventHandler(async (event) => {
family: family || hasLocks
})
}
if (hasHide) setClipHidden(owner, id, body.hideThumbnail === true, family)
if (hasHide) await setClipHidden(owner, id, body.hideThumbnail === true, family)
if (hasHide && !folderId && !hasName && !hasLocks && !hasRefs) {
return { id, hideThumbnail: body.hideThumbnail === true }
}
+4 -1
View File
@@ -20,6 +20,9 @@ export default defineEventHandler(async (event) => {
if (family) await renameStillFamily(owner, id, body.name || '')
else await renameStill(owner, id, body.name || '')
}
if (hasHide) setStillHidden(owner, id, body.hideInput === true, family)
if (hasHide) await setStillHidden(owner, id, body.hideInput === true, family)
if (hasHide && !folderId && !hasName) {
return { id, hideInput: body.hideInput === true }
}
return publicLibrary(event)
})