Default hide input still and hide output preview on for xAIGen.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-28 17:59:38 -05:00
co-authored by Cursor
parent 3ed1d6aa9d
commit b8c0fb029d
+28 -5
View File
@@ -475,7 +475,7 @@
<span class="absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white transition peer-checked:translate-x-5" />
</span>
</label>
<p v-if="showPrivacyToggles" class="text-xs text-zinc-500">Output preview hides library thumbs and autoplay. Click the player or still to reveal; click anywhere else on the page to hide it again. Folder default applies to output preview when you pick a new still.</p>
<p v-if="showPrivacyToggles" class="text-xs text-zinc-500">Hide input still and hide output preview are on by default. Click the player or still to reveal; click anywhere else on the page to hide it again.</p>
</div>
</div>
@@ -1676,6 +1676,7 @@ import {
composeVideoWorkflow,
isLtxWorkflow,
isTextToVideo,
isXaigenStudio,
ltxWorkflowEnabled,
minimaxGraphOf,
parseVideoWorkflow,
@@ -1965,7 +1966,10 @@ const ltxEnabled = computed(() => ltxWorkflowEnabled({
studio: runtimeConfig.public.studio,
instanceName: instanceName.value
}))
const showPrivacyToggles = computed(() => /xaigen/i.test(String(instanceName.value)))
const showPrivacyToggles = computed(() => isXaigenStudio({
studio: runtimeConfig.public.studio,
instanceName: instanceName.value
}))
const folders = ref<LibraryFolder[]>([])
const clips = ref<LibraryClip[]>([])
const stills = ref<LibraryStill[]>([])
@@ -2678,18 +2682,31 @@ function editChainPartDot(index: number) {
return 'bg-zinc-600'
}
function readPrivacyToggle(key: string, fallback: boolean) {
try {
const raw = localStorage.getItem(key)
if (raw === 'true') return true
if (raw === 'false') return false
} catch { /* ignore */ }
return fallback
}
function applyThumbnailDefault() {
if (!showPrivacyToggles.value) {
hideThumbnail.value = false
return
}
hideThumbnail.value = currentFolder.value ? !currentFolder.value.thumbnailDefault : false
hideThumbnail.value = readPrivacyToggle('aigen-hide-output-preview', true)
}
function applyInstancePrivacy() {
if (showPrivacyToggles.value) return
if (!showPrivacyToggles.value) {
hideInputPreview.value = false
hideThumbnail.value = false
return
}
hideInputPreview.value = readPrivacyToggle('aigen-hide-input-preview', true)
hideThumbnail.value = readPrivacyToggle('aigen-hide-output-preview', true)
}
function applyLibrary(data: { folders?: LibraryFolder[]; clips?: LibraryClip[]; stills?: LibraryStill[]; drafts?: RetryDraft[] } | unknown) {
@@ -2764,7 +2781,6 @@ async function pollComfyHealth() {
onMounted(async () => {
try {
hideInputPreview.value = localStorage.getItem('aigen-hide-input-preview') === 'true'
withSound.value = localStorage.getItem('aigen-generate-sound') !== 'false'
autoplayEnabled.value = localStorage.getItem('aigen-autoplay') === 'true'
videoEngine.value = 'minimax'
@@ -2880,6 +2896,13 @@ watch(hideInputPreview, (value) => {
} catch { /* ignore */ }
})
watch(hideThumbnail, (value) => {
if (!showPrivacyToggles.value) return
try {
localStorage.setItem('aigen-hide-output-preview', String(value))
} catch { /* ignore */ }
})
watch(withSound, (value) => {
try {
localStorage.setItem('aigen-generate-sound', String(value))