From ddf6056d4323c70ce9a29ca21d903c798019d96d Mon Sep 17 00:00:00 2001 From: gator Date: Thu, 10 Sep 2026 12:22:16 +0000 Subject: [PATCH] admin: copy the prompt, and list the renditions derived from the master --- admin.html | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/admin.html b/admin.html index c329bc4..9a366f3 100644 --- a/admin.html +++ b/admin.html @@ -111,8 +111,13 @@ function shotHtml(s) { + 'after filming — it was NOT used for the video above' : '') + '' + // Copyable on purpose: the same text pasted into the Gemini web app is how + // we tell an artifact of OUR prompt from an artifact of the API path. + (s.prompt_sent - ? '
Exact prompt sent
' + esc(s.prompt_sent) + '
' + ? '
Exact prompt sent' + + '' + + '
' + esc(s.prompt_sent) + '
' : '
no prompt recorded (filmed before prompts were stored)
') // The prompt and the request are not the same claim. An earlier version of // video_render validated its images and then posted only the prompt, which @@ -159,6 +164,21 @@ function projHtml(p) { + (p.owner_notes ? '

notes ' + esc(p.owner_notes) + '

' : '') + '' + (p.full_text ? '
Full piece as written
' + esc(p.full_text) + '
' : '') + // The master is what Veo produced. Everything else is derived from it and + // is disposable; the master is not regenerated and not overwritten. + + (p.renditions && p.renditions.length + ? '
' + p.renditions.length + ' renditions' + + p.renditions.map(function (r) { + return '
' + + '' + esc(r.label || r.kind || "") + '' + + (r.url ? ' · open' : '') + + (r.made_at ? ' · ' + esc(when(r.made_at)) : '') + + (r.note ? '
' + esc(r.note) + '' : '') + + '
'; + }).join("") + + '
' + : '') + (p.shots && p.shots.length ? '
' + p.shots.length + ' shots' + p.shots.map(shotHtml).join("") + '
' : '') @@ -191,6 +211,27 @@ async function load() { // Delegated, because the list is re-rendered wholesale on every load. document.getElementById("out").onclick = async function (ev) { + var cp = ev.target.closest ? ev.target.closest(".copyp") : null; + if (cp) { + var pre = cp.parentElement.querySelector("pre"); + if (pre) { + try { + await navigator.clipboard.writeText(pre.textContent); + cp.textContent = "Copied"; + } catch (e) { + // Clipboard needs a secure context and permission; selecting the + // text is a working fallback rather than a dead button. + var rg = document.createRange(); + rg.selectNodeContents(pre); + var sel = window.getSelection(); + sel.removeAllRanges(); + sel.addRange(rg); + cp.textContent = "Selected — press Ctrl+C"; + } + setTimeout(function () { cp.textContent = "Copy this prompt"; }, 2500); + } + return; + } var b = ev.target.closest ? ev.target.closest("[data-redub]") : null; if (!b) return; b.disabled = true;