Earlier takes of a shot, with Use this take
This commit is contained in:
parent
d25d596214
commit
72d811303d
1 changed files with 14 additions and 0 deletions
14
trailer.html
14
trailer.html
|
|
@ -1619,6 +1619,12 @@
|
|||
+ (s.opening_url ? '<figure><img data-zoom="' + esc("shot " + s.id + " — the frame it was filmed from")
|
||||
+ '" src="' + esc(s.opening_url) + '" alt=""><figcaption>filmed from this frame</figcaption></figure>' : '')
|
||||
+ '</div>';
|
||||
// EARLIER TAKES: every clip this shot has had, any of them back in one press.
|
||||
var tk = (s.takes || []).slice().reverse();
|
||||
if (tk.length) media += '<details class="takes" style="margin:4px 0 8px"><summary style="cursor:pointer;font-size:12px;color:var(--muted)">Earlier takes of this shot (' + tk.length + ')</summary><div class="frames">'
|
||||
+ tk.map(function (t) { return '<figure><video src="' + esc(t.clip_url) + '" controls preload="none" style="max-width:220px"></video><figcaption>'
|
||||
+ (t.replaced_at ? 'replaced ' + esc(String(t.replaced_at).replace("T", " ").slice(0, 16)) : '') + '<br><button type="button" class="btn small" data-usetake="' + esc(s.id) + '|' + esc(t.clip_url) + '">Use this take</button></figcaption></figure>'; }).join("")
|
||||
+ '</div></details>';
|
||||
} else if (s.opening_url || s.closing_url) {
|
||||
media += '<div class="frames">'
|
||||
+ (s.opening_url ? '<figure><img data-zoom="' + esc("shot " + s.id + " opens on")
|
||||
|
|
@ -1803,6 +1809,14 @@
|
|||
if (r) { showMsg("msg", "Shot " + ssid + " is now " + Number(r.seconds).toFixed(1) + " s." + (PKG.shots.some(function (x) { return x.id === ssid && x.clip_url; }) ? " The clip was filmed at the old length; make the shot again to refilm." : ""), "ok"); await refresh(); }
|
||||
return;
|
||||
}
|
||||
if ((el = hit("data-usetake"))) {
|
||||
var ut = el.getAttribute("data-usetake"), uti = ut.indexOf("|");
|
||||
el.disabled = true;
|
||||
r = await act("use_take", { draft_id: CUR, shot_id: ut.slice(0, uti), clip_url: ut.slice(uti + 1) });
|
||||
if (r) { showMsg("msg", "Shot " + ut.slice(0, uti) + " uses that take again. The one it replaced is in the list, so you can switch back.", "ok"); await refresh(); }
|
||||
else el.disabled = false;
|
||||
return;
|
||||
}
|
||||
if ((el = hit("data-floor"))) {
|
||||
var flid = el.getAttribute("data-floor"), flon = !!el.checked;
|
||||
el.disabled = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue