36 lines
4.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@model PlotLine.Models.WritingActivityPage
@{
ViewData["Title"] = "Writing activity";
ViewData["ProjectSection"] = "Writer";
}
<div class="page-heading" data-pwa-header>
<div><p class="eyebrow">Writer · Evidence</p><h1>Writing activity</h1><p class="lead-text">@(Model.Book?.BookDisplayTitle ?? "Selected manuscript")</p></div>
<a class="btn btn-outline-primary" asp-controller="Writer" asp-action="Index" asp-route-projectId="@Model.Book?.ProjectID" asp-route-bookId="@Model.BookID">Back to Writer</a>
</div>
<p>These are accepted snapshot differences and separately labelled native observations. They do not measure writing time or prove authorship. Earlier writing and changes between observations may be unavailable.</p>
@if(Model.Events.Count == 0)
{
<section class="story-bible-section"><h2>Begin with the manuscript you have</h2><p>No retained activity is available. Record the current accepted manuscript as a baseline; its existing words will not count as new writing.</p>
<form asp-action="Baseline" method="post"><input type="hidden" name="bookId" value="@Model.BookID" /><button class="btn btn-primary" disabled="@(!Model.Settings.Enabled)">Record current baseline</button></form></section>
}
else
{
<section class="story-bible-section"><h2>Retained evidence</h2><p>Up to 500 records per page. Times below are server receipt times in UTC; source observation time is shown separately when available.</p>
<div class="table-responsive"><table class="table"><thead><tr><th>Received (UTC)</th><th>Evidence</th><th>Scope</th><th>Added</th><th>Removed</th><th>Net</th></tr></thead><tbody>
@foreach(var e in Model.Events)
{
<tr><td>@e.ReceivedUtc.ToString("dd MMM yyyy HH:mm:ss")@if(e.ObservedUtc.HasValue){<div class="small">Observed @e.ObservedUtc.Value.ToString("dd MMM yyyy HH:mm:ss") UTC</div>}</td><td><strong>@e.Kind</strong> · @e.Source<div class="small">@e.Provenance · @e.Coverage</div></td><td>@if(e.ChapterID.HasValue){<a asp-controller="Writer" asp-action="Chapter" asp-route-id="@e.ChapterID">@(e.ChapterTitle ?? "Chapter")</a>}else{<span>Manuscript</span>}<div class="small">Accepted revision @e.Revision</div></td><td>@(e.Kind=="Change"?e.Added.ToString("N0"):"—")</td><td>@(e.Kind=="Change"?e.Removed.ToString("N0"):"—")</td><td>@(e.Kind=="Change"?e.Net.ToString("+0;-0;0"):"—")</td></tr>
}
</tbody></table></div>
<a class="btn btn-outline-primary" asp-action="Export" asp-route-bookId="@Model.BookID">Export recent evidence (JSON)</a>
@if(Model.Events.Count==500){<a class="btn btn-outline-secondary" asp-action="Index" asp-route-bookId="@Model.BookID" asp-route-before="@Model.Events.Last().Sequence">Earlier evidence</a>}
</section>
}
<section class="story-bible-section"><h2>Privacy and retention</h2><p>Activity stores counts, identifiers and evidence metadata, never a second copy of your prose. Default retention is 365 days. Compact retry receipts remain until the book is permanently deleted to prevent duplicate delivery. Retention runs daily; reducing it also removes older records now. Pausing leaves manuscript synchronisation available.</p>
<form asp-action="Settings" method="post"><input type="hidden" name="bookId" value="@Model.BookID" />
<label class="form-check"><input class="form-check-input" type="checkbox" name="enabled" value="true" checked="@Model.Settings.Enabled" /> Record activity for this book</label>
<label>Keep activity for <input class="form-control" type="number" name="retentionDays" min="30" max="3650" value="@Model.Settings.RetentionDays" /> days (30–3650)</label>
<button class="btn btn-primary mt-2">Save privacy settings</button></form>
<details class="mt-3"><summary>Delete retained activity</summary><p>This removes retained activity and pauses capture. It does not change your manuscript. Previously exported files and existing backups are separate copies.</p><form asp-action="Erase" method="post"><input type="hidden" name="bookId" value="@Model.BookID" /><label><input type="checkbox" name="confirm" value="true" required /> Delete this book's activity and pause capture</label><button class="btn btn-outline-danger ms-2">Delete activity</button></form></details>
</section>