Default hide input still and hide output preview on for xAIGen.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+30
-7
@@ -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 class="absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white transition peer-checked:translate-x-5" />
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1676,6 +1676,7 @@ import {
|
|||||||
composeVideoWorkflow,
|
composeVideoWorkflow,
|
||||||
isLtxWorkflow,
|
isLtxWorkflow,
|
||||||
isTextToVideo,
|
isTextToVideo,
|
||||||
|
isXaigenStudio,
|
||||||
ltxWorkflowEnabled,
|
ltxWorkflowEnabled,
|
||||||
minimaxGraphOf,
|
minimaxGraphOf,
|
||||||
parseVideoWorkflow,
|
parseVideoWorkflow,
|
||||||
@@ -1965,7 +1966,10 @@ const ltxEnabled = computed(() => ltxWorkflowEnabled({
|
|||||||
studio: runtimeConfig.public.studio,
|
studio: runtimeConfig.public.studio,
|
||||||
instanceName: instanceName.value
|
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 folders = ref<LibraryFolder[]>([])
|
||||||
const clips = ref<LibraryClip[]>([])
|
const clips = ref<LibraryClip[]>([])
|
||||||
const stills = ref<LibraryStill[]>([])
|
const stills = ref<LibraryStill[]>([])
|
||||||
@@ -2678,18 +2682,31 @@ function editChainPartDot(index: number) {
|
|||||||
return 'bg-zinc-600'
|
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() {
|
function applyThumbnailDefault() {
|
||||||
if (!showPrivacyToggles.value) {
|
if (!showPrivacyToggles.value) {
|
||||||
hideThumbnail.value = false
|
hideThumbnail.value = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
hideThumbnail.value = currentFolder.value ? !currentFolder.value.thumbnailDefault : false
|
hideThumbnail.value = readPrivacyToggle('aigen-hide-output-preview', true)
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyInstancePrivacy() {
|
function applyInstancePrivacy() {
|
||||||
if (showPrivacyToggles.value) return
|
if (!showPrivacyToggles.value) {
|
||||||
hideInputPreview.value = false
|
hideInputPreview.value = false
|
||||||
hideThumbnail.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) {
|
function applyLibrary(data: { folders?: LibraryFolder[]; clips?: LibraryClip[]; stills?: LibraryStill[]; drafts?: RetryDraft[] } | unknown) {
|
||||||
@@ -2764,7 +2781,6 @@ async function pollComfyHealth() {
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
try {
|
try {
|
||||||
hideInputPreview.value = localStorage.getItem('aigen-hide-input-preview') === 'true'
|
|
||||||
withSound.value = localStorage.getItem('aigen-generate-sound') !== 'false'
|
withSound.value = localStorage.getItem('aigen-generate-sound') !== 'false'
|
||||||
autoplayEnabled.value = localStorage.getItem('aigen-autoplay') === 'true'
|
autoplayEnabled.value = localStorage.getItem('aigen-autoplay') === 'true'
|
||||||
videoEngine.value = 'minimax'
|
videoEngine.value = 'minimax'
|
||||||
@@ -2880,6 +2896,13 @@ watch(hideInputPreview, (value) => {
|
|||||||
} catch { /* ignore */ }
|
} catch { /* ignore */ }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(hideThumbnail, (value) => {
|
||||||
|
if (!showPrivacyToggles.value) return
|
||||||
|
try {
|
||||||
|
localStorage.setItem('aigen-hide-output-preview', String(value))
|
||||||
|
} catch { /* ignore */ }
|
||||||
|
})
|
||||||
|
|
||||||
watch(withSound, (value) => {
|
watch(withSound, (value) => {
|
||||||
try {
|
try {
|
||||||
localStorage.setItem('aigen-generate-sound', String(value))
|
localStorage.setItem('aigen-generate-sound', String(value))
|
||||||
|
|||||||
Reference in New Issue
Block a user