Show Send to Backup on AIGen output and library stills.
The control was hidden until BACKUP_STUDIO_URL was set, so it never appeared next to Send to Refine. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ export default defineNuxtConfig({
|
|||||||
// NUXT_PUBLIC_STUDIO=xaigen on the xAIGen Coolify app (LTX Pink Cherry + xAIGen-prefixed LoRAs)
|
// NUXT_PUBLIC_STUDIO=xaigen on the xAIGen Coolify app (LTX Pink Cherry + xAIGen-prefixed LoRAs)
|
||||||
studio: process.env.NUXT_PUBLIC_STUDIO || '',
|
studio: process.env.NUXT_PUBLIC_STUDIO || '',
|
||||||
kreaConceptLora: process.env.NUXT_PUBLIC_KREA_CONCEPT_LORA || process.env.NUXT_KREA_CONCEPT_LORA || '',
|
kreaConceptLora: process.env.NUXT_PUBLIC_KREA_CONCEPT_LORA || process.env.NUXT_KREA_CONCEPT_LORA || '',
|
||||||
backupStudioEnabled: Boolean(String(process.env.BACKUP_STUDIO_URL || '').trim()) && !xaigenStudio
|
backupStudioEnabled: !xaigenStudio
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
nitro: {
|
nitro: {
|
||||||
|
|||||||
+29
-2
@@ -1382,6 +1382,15 @@
|
|||||||
>
|
>
|
||||||
{{ keepingInputBusy ? 'Saving…' : 'Save as input' }}
|
{{ keepingInputBusy ? 'Saving…' : 'Save as input' }}
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="canUseGeneratedStill && backupStudioEnabled"
|
||||||
|
type="button"
|
||||||
|
class="inline-flex rounded-2xl border border-amber-300/40 px-4 py-2 text-sm text-amber-100 hover:border-amber-300/70 disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
|
:disabled="Boolean(backupBusyId)"
|
||||||
|
@click="sendOutputStillToBackup"
|
||||||
|
>
|
||||||
|
{{ backupBusyId ? 'Sending…' : 'Send to Backup' }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="extendOpen" id="extend-clip" class="mt-4 space-y-4 rounded-2xl border border-white/10 bg-zinc-950/50 p-4">
|
<div v-if="extendOpen" id="extend-clip" class="mt-4 space-y-4 rounded-2xl border border-white/10 bg-zinc-950/50 p-4">
|
||||||
<div class="flex items-start justify-between gap-3">
|
<div class="flex items-start justify-between gap-3">
|
||||||
@@ -1547,6 +1556,15 @@
|
|||||||
>
|
>
|
||||||
Send to Refine
|
Send to Refine
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
v-if="backupStudioEnabled"
|
||||||
|
type="button"
|
||||||
|
class="inline-flex rounded-2xl border border-amber-300/40 px-4 py-2 text-sm text-amber-100 hover:border-amber-300/70 disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
|
:disabled="Boolean(backupBusyId)"
|
||||||
|
@click="sendOutputStillToBackup"
|
||||||
|
>
|
||||||
|
{{ backupBusyId ? 'Sending…' : 'Send to Backup' }}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1918,7 +1936,7 @@
|
|||||||
class="text-xs text-amber-300"
|
class="text-xs text-amber-300"
|
||||||
:disabled="backupBusyId === entry.stillGroup.head.id"
|
:disabled="backupBusyId === entry.stillGroup.head.id"
|
||||||
@click="sendStillToBackup(entry.stillGroup.head)"
|
@click="sendStillToBackup(entry.stillGroup.head)"
|
||||||
>{{ backupBusyId === entry.stillGroup.head.id ? 'Sending…' : 'Send to Backup on AIGen only' }}</button>
|
>{{ backupBusyId === entry.stillGroup.head.id ? 'Sending…' : 'Send to Backup' }}</button>
|
||||||
<button type="button" class="text-xs text-zinc-400" @click="toggleDetails(entry.key)">
|
<button type="button" class="text-xs text-zinc-400" @click="toggleDetails(entry.key)">
|
||||||
{{ expandedDetails[entry.key] ? 'Hide details' : 'Details' }}
|
{{ expandedDetails[entry.key] ? 'Hide details' : 'Details' }}
|
||||||
</button>
|
</button>
|
||||||
@@ -2001,7 +2019,7 @@
|
|||||||
class="text-xs text-amber-300"
|
class="text-xs text-amber-300"
|
||||||
:disabled="backupBusyId === item.id"
|
:disabled="backupBusyId === item.id"
|
||||||
@click="sendStillToBackup(item)"
|
@click="sendStillToBackup(item)"
|
||||||
>{{ backupBusyId === item.id ? 'Sending…' : 'Send to Backup on AIGen only' }}</button>
|
>{{ backupBusyId === item.id ? 'Sending…' : 'Send to Backup' }}</button>
|
||||||
<button type="button" class="text-xs text-zinc-400" @click="toggleDetails(item.id)">
|
<button type="button" class="text-xs text-zinc-400" @click="toggleDetails(item.id)">
|
||||||
{{ expandedDetails[item.id] ? 'Hide details' : 'Details' }}
|
{{ expandedDetails[item.id] ? 'Hide details' : 'Details' }}
|
||||||
</button>
|
</button>
|
||||||
@@ -5907,6 +5925,15 @@ function stillUseAsInputMessage(still: LibraryStill) {
|
|||||||
return 'Loaded as input. It stays in Output, not the upload library.'
|
return 'Loaded as input. It stays in Output, not the upload library.'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function sendOutputStillToBackup() {
|
||||||
|
const stillId = lastV2StillId.value || stillIdFromLibraryUrl(editResultUrl.value)
|
||||||
|
if (!stillId) {
|
||||||
|
toast('Save this still first, then send it to Backup.')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await sendStillToBackup({ id: stillId })
|
||||||
|
}
|
||||||
|
|
||||||
async function sendStillToBackup(still: Pick<LibraryStill, 'id'>) {
|
async function sendStillToBackup(still: Pick<LibraryStill, 'id'>) {
|
||||||
if (!backupStudioEnabled.value || backupBusyId.value) return
|
if (!backupStudioEnabled.value || backupBusyId.value) return
|
||||||
backupBusyId.value = still.id
|
backupBusyId.value = still.id
|
||||||
|
|||||||
+1
-1
@@ -277,7 +277,7 @@
|
|||||||
class="rounded-full border border-white/10 px-3 py-1.5 text-xs text-zinc-300 hover:text-white"
|
class="rounded-full border border-white/10 px-3 py-1.5 text-xs text-zinc-300 hover:text-white"
|
||||||
:disabled="backupBusy"
|
:disabled="backupBusy"
|
||||||
@click="sendFocusedToBackup"
|
@click="sendFocusedToBackup"
|
||||||
>{{ backupBusy ? 'Sending…' : 'Send to Backup on AIGen only' }}</button>
|
>{{ backupBusy ? 'Sending…' : 'Send to Backup' }}</button>
|
||||||
<a
|
<a
|
||||||
v-if="downloadHref"
|
v-if="downloadHref"
|
||||||
:href="downloadHref"
|
:href="downloadHref"
|
||||||
|
|||||||
Reference in New Issue
Block a user