Load the watch-through numbers alongside the cuts
The views table already records how far every viewer of a share page got. Once each published cut has its own page, "which version holds people" is a query, and this is where the answer is shown.
This commit is contained in:
parent
7b4ee1895a
commit
fabb7d2ed8
1 changed files with 5 additions and 0 deletions
|
|
@ -254,6 +254,11 @@
|
||||||
if (!r.ok) { pane.innerHTML = '<p class="empty">' + esc(r.error || "") + '</p>'; return; }
|
if (!r.ok) { pane.innerHTML = '<p class="empty">' + esc(r.error || "") + '</p>'; return; }
|
||||||
PKG = r.draft.package || {};
|
PKG = r.draft.package || {};
|
||||||
NOTES = r.draft.notes || {};
|
NOTES = r.draft.notes || {};
|
||||||
|
STATS = {};
|
||||||
|
if ((PKG.cuts || []).some(function (c) { return c.project_id; })) {
|
||||||
|
var cs = await api("cut_stats", { draft_id: id });
|
||||||
|
((cs && cs.cuts) || []).forEach(function (x) { STATS[x.cut_id] = x; });
|
||||||
|
}
|
||||||
pane.innerHTML = paneHtml(meta, r.draft);
|
pane.innerHTML = paneHtml(meta, r.draft);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue