diff --git a/pages/index.vue b/pages/index.vue index 4020bb9..c5edd51 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1311,8 +1311,22 @@ -
{{ lastFrameLoading ? 'Reading last frame…' : 'Last frame preview unavailable' }}
@@ -2448,6 +2462,7 @@ const extendPrompt = ref('') const extendDuration = ref(5) const lastFrameUrl = ref('') const lastFrameLoading = ref(false) +const lastFrameRevealed = ref(false) const watchingLibrary = ref(false) let lastFrameObjectUrl = '' let lastFrameGen = 0 @@ -2801,6 +2816,11 @@ const videoModelHint = computed(() => { const frameCount = computed(() => Math.max(5, Math.floor(duration.value * fps.value))) const cfgPct = computed(() => ((cfg.value - CFG_MIN) / (CFG_MAX - CFG_MIN)) * 100) const currentClip = computed(() => clips.value.find(clip => clip.id === currentClipId.value)) +const hideExtendLastFrame = computed(() => ( + showPrivacyToggles.value + && !lastFrameRevealed.value + && (hideInputPreview.value || hideThumbnail.value || currentClip.value?.hideThumbnail === true) +)) const canExtend = computed(() => Boolean( videoUrl.value && !lockedSave.value @@ -3731,6 +3751,12 @@ watch(hideThumbnail, (value) => { } catch { /* ignore */ } }) +watch(hideExtendLastFrame, (hidden) => { + if (hidden || !extendOpen.value) return + const id = currentClipId.value || clipIdFromPlayer() + if (id && !lastFrameUrl.value && !lastFrameLoading.value) void loadLastFrame(id) +}) + watch(withSound, (value) => { try { localStorage.setItem('aigen-generate-sound', String(value)) @@ -5153,6 +5179,7 @@ function concealFromOutsideTap(event: Event) { if (concealEditOutput.value && !editAwaitingReveal.value && !editLockedSave.value && editResultUrl.value) { editAwaitingReveal.value = true } + if (showPrivacyToggles.value) lastFrameRevealed.value = false } function concealAndPause() { @@ -5399,6 +5426,7 @@ function closeExtend() { lastFrameGen += 1 extendOpen.value = false lastFrameLoading.value = false + lastFrameRevealed.value = false if (lastFrameObjectUrl) { URL.revokeObjectURL(lastFrameObjectUrl) lastFrameObjectUrl = '' @@ -5406,6 +5434,29 @@ function closeExtend() { lastFrameUrl.value = '' } +async function loadLastFrame(id: string) { + lastFrameLoading.value = true + const gen = ++lastFrameGen + try { + const blob = await $fetch