Put studio scrolling back and actually save image pre-text and post-text.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+5
-41
@@ -7,8 +7,8 @@
|
||||
@gpu="pollComfyHealth"
|
||||
/>
|
||||
|
||||
<main class="mx-auto grid min-w-0 max-w-7xl gap-6 px-4 py-6 sm:px-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] lg:items-start">
|
||||
<section id="studio-input" ref="studioInput" class="glass min-w-0 max-w-full space-y-5 rounded-3xl p-5 sm:p-6">
|
||||
<main class="mx-auto grid min-w-0 max-w-7xl gap-6 px-4 py-6 sm:px-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] lg:items-stretch">
|
||||
<section id="studio-input" class="glass min-w-0 max-w-full space-y-5 rounded-3xl p-5 sm:p-6">
|
||||
<div>
|
||||
<div class="mb-4 grid grid-cols-2 gap-3">
|
||||
<button
|
||||
@@ -1207,10 +1207,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section
|
||||
class="flex min-w-0 max-w-full flex-col gap-5 lg:overflow-hidden"
|
||||
:style="studioColumnMax ? { maxHeight: studioColumnMax } : undefined"
|
||||
>
|
||||
<section class="flex min-w-0 max-w-full flex-col gap-5 lg:h-full lg:min-h-0">
|
||||
<div ref="outputPanel" class="glass min-w-0 max-w-full rounded-3xl p-5 sm:p-6 lg:shrink-0">
|
||||
<div class="flex items-center justify-between gap-3">
|
||||
<div class="flex items-center gap-3">
|
||||
@@ -1569,7 +1566,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="glass rounded-3xl p-5 sm:p-6 lg:flex lg:min-h-0 lg:flex-1 lg:flex-col lg:overflow-hidden">
|
||||
<div class="glass rounded-3xl p-5 sm:p-6 lg:flex lg:min-h-[24rem] lg:flex-1 lg:flex-col">
|
||||
<div class="flex items-center justify-between gap-3">
|
||||
<h2 class="font-display text-xl font-bold">Library</h2>
|
||||
<div class="flex items-center gap-3">
|
||||
@@ -1600,7 +1597,7 @@
|
||||
</form>
|
||||
|
||||
<template v-else>
|
||||
<div class="lg:flex lg:min-h-0 lg:flex-1 lg:flex-col lg:overflow-hidden">
|
||||
<div class="lg:flex lg:min-h-0 lg:flex-1 lg:flex-col">
|
||||
<div class="mt-4 flex flex-wrap items-center justify-between gap-2">
|
||||
<div class="flex min-w-0 flex-wrap gap-1.5">
|
||||
<button
|
||||
@@ -2452,36 +2449,6 @@ const imageFillWithoutPrompt = computed(() => (
|
||||
|
||||
const player = ref<HTMLVideoElement | null>(null)
|
||||
const outputPanel = ref<HTMLElement | null>(null)
|
||||
const studioInput = ref<HTMLElement | null>(null)
|
||||
const studioColumnMax = ref('')
|
||||
let studioLayoutObserver: ResizeObserver | null = null
|
||||
|
||||
function syncStudioColumnMax() {
|
||||
const input = studioInput.value
|
||||
const output = outputPanel.value
|
||||
if (!input || !window.matchMedia('(min-width: 1024px)').matches) {
|
||||
studioColumnMax.value = ''
|
||||
return
|
||||
}
|
||||
const next = Math.max(input.offsetHeight, (output?.offsetHeight || 0) + 256)
|
||||
studioColumnMax.value = `${next}px`
|
||||
}
|
||||
|
||||
function bindStudioColumnMax() {
|
||||
unbindStudioColumnMax()
|
||||
syncStudioColumnMax()
|
||||
if (typeof ResizeObserver === 'undefined') return
|
||||
studioLayoutObserver = new ResizeObserver(() => syncStudioColumnMax())
|
||||
if (studioInput.value) studioLayoutObserver.observe(studioInput.value)
|
||||
if (outputPanel.value) studioLayoutObserver.observe(outputPanel.value)
|
||||
window.addEventListener('resize', syncStudioColumnMax)
|
||||
}
|
||||
|
||||
function unbindStudioColumnMax() {
|
||||
studioLayoutObserver?.disconnect()
|
||||
studioLayoutObserver = null
|
||||
window.removeEventListener('resize', syncStudioColumnMax)
|
||||
}
|
||||
const editLightbox = ref<HTMLElement | null>(null)
|
||||
const editLightboxUrl = ref('')
|
||||
const file = ref<File | null>(null)
|
||||
@@ -3963,12 +3930,9 @@ onMounted(async () => {
|
||||
if (route.query.clip || route.query.still) applyIncomingLibraryItem()
|
||||
else applyIncomingDirectorScript()
|
||||
window.addEventListener('keydown', onStudioKey)
|
||||
await nextTick()
|
||||
bindStudioColumnMax()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
unbindStudioColumnMax()
|
||||
unbindConcealListeners()
|
||||
window.removeEventListener('keydown', onStudioKey)
|
||||
studioPollAlive = false
|
||||
|
||||
Reference in New Issue
Block a user