Add a dedicated Library page for search, sort, select, and drag-to-folder.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+29
-1
@@ -35,6 +35,12 @@
|
||||
<button type="button" class="rounded-full border border-white/10 px-3 py-1 text-zinc-300 hover:border-amber-300/50 hover:text-white" @click="settingsOpen = true">
|
||||
Settings
|
||||
</button>
|
||||
<NuxtLink
|
||||
to="/library"
|
||||
class="rounded-full border border-white/10 px-3 py-1 text-zinc-300 hover:border-amber-300/50 hover:text-white"
|
||||
>
|
||||
Library
|
||||
</NuxtLink>
|
||||
<NuxtLink
|
||||
to="/director"
|
||||
class="rounded-full border border-white/10 px-3 py-1 text-zinc-300 hover:border-amber-300/50 hover:text-white"
|
||||
@@ -1464,6 +1470,7 @@
|
||||
<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">
|
||||
<NuxtLink to="/library" class="text-xs text-amber-300 hover:text-amber-100">Open full library</NuxtLink>
|
||||
<button
|
||||
v-if="libraryEntries.length"
|
||||
type="button"
|
||||
@@ -3547,7 +3554,8 @@ onMounted(async () => {
|
||||
await refreshStudioQueue()
|
||||
await refreshLiveQueue()
|
||||
await loadPromptPresets()
|
||||
applyIncomingDirectorScript()
|
||||
if (route.query.clip || route.query.still) applyIncomingLibraryItem()
|
||||
else applyIncomingDirectorScript()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
@@ -3863,6 +3871,26 @@ async function deleteDirectorScript() {
|
||||
}
|
||||
}
|
||||
|
||||
function applyIncomingLibraryItem() {
|
||||
const clipId = String(route.query.clip || '').trim()
|
||||
const stillId = String(route.query.still || '').trim()
|
||||
const use = String(route.query.use || '') === '1'
|
||||
if (clipId) {
|
||||
const clip = clips.value.find(item => item.id === clipId)
|
||||
if (clip) {
|
||||
if (use) void useClipAsInput(clip)
|
||||
else openClip(clip)
|
||||
}
|
||||
} else if (stillId) {
|
||||
const still = stills.value.find(item => item.id === stillId)
|
||||
if (still) {
|
||||
if (use) void useStillAsInput(still)
|
||||
else openStill(still)
|
||||
}
|
||||
}
|
||||
void router.replace({ path: '/', query: {} })
|
||||
}
|
||||
|
||||
function applyIncomingDirectorScript() {
|
||||
const scriptId = String(route.query.script || '').trim()
|
||||
if (scriptId) {
|
||||
|
||||
Reference in New Issue
Block a user