Add a persistent clip library with folders, optional password, and hidden-thumbnail glow.

Generated videos save into a chosen folder, sensitive clips skip thumbnails until played, and Docker writes the catalog to a Coolify volume.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-25 18:03:26 -05:00
co-authored by Cursor
parent 30669c7a27
commit 83051e0ea3
20 changed files with 749 additions and 60 deletions
+13
View File
@@ -9,6 +9,7 @@ export interface SessionUser {
const COOKIE = 'aigen_session'
const STATE_COOKIE = 'aigen_oauth_state'
const LIBRARY_COOKIE = 'aigen_library'
function secret() {
const config = useRuntimeConfig()
@@ -78,6 +79,18 @@ export function authEnabled() {
return Boolean(config.public.authEnabled && config.oidcClientId && config.oidcClientSecret)
}
export function setLibraryUnlock(event: H3Event, version: string) {
setCookie(event, LIBRARY_COOKIE, seal({ version }), cookieOpts(event))
}
export function getLibraryUnlockVersion(event: H3Event) {
return unseal<{ version?: string }>(getCookie(event, LIBRARY_COOKIE))?.version || null
}
export function clearLibraryUnlock(event: H3Event) {
deleteCookie(event, LIBRARY_COOKIE, { path: '/' })
}
export function publicBaseUrl(event: H3Event) {
const proto = getRequestHeader(event, 'x-forwarded-proto') || getRequestProtocol(event)
const host = getRequestHeader(event, 'x-forwarded-host') || getRequestHost(event)