PlotDirector/PlotLine/Views/Onboarding/BuildComplete.cshtml

133 lines
7.1 KiB
Plaintext

@model OnboardingManuscriptBuildResult
@{
ViewData["Title"] = "Manuscript imported";
var coreComplete = string.Equals(Model.Status, "CoreImportComplete", StringComparison.OrdinalIgnoreCase);
}
<section class="onboarding-shell" aria-labelledby="build-complete-title">
<div class="onboarding-panel onboarding-review-panel">
<partial name="_OnboardingJourneyHeader" model="@(new OnboardingJourneyHeaderViewModel { CurrentStep = coreComplete ? 10 : 8, TotalSteps = 10 })" />
<div class="onboarding-copy">
<p class="eyebrow">@(coreComplete ? "Core Import Complete" : "Scene Detection Complete")</p>
<div class="onboarding-success-heading">
<span aria-hidden="true">&check;</span>
<h1 id="build-complete-title">@(coreComplete ? "Core import is complete." : "Scene structure has been detected.")</h1>
</div>
<p>
@if (coreComplete)
{
@:@Model.ChaptersCreated.ToString("N0") chapters &middot; @Model.ScenesCreated.ToString("N0") scenes &middot; @((Model.CharactersCreated + Model.CharactersReused).ToString("N0")) characters. Core import is complete.
}
else if (Model.AlreadyBuilt)
{
@:This manuscript structure has already been created in PlotDirector, so nothing was duplicated. Review characters to complete the core import.
}
else
{
@:@Model.ScenesCreated.ToString("N0") scenes imported across @Model.ChaptersCreated.ToString("N0") chapters. Keep this browser workflow open to review characters.
}
</p>
@if (!string.IsNullOrWhiteSpace(Model.MarkerWarning))
{
<p class="text-warning">@Model.MarkerWarning</p>
}
</div>
<p class="onboarding-compact-status">
@Model.ChaptersCreated.ToString("N0") chapter@(Model.ChaptersCreated == 1 ? string.Empty : "s") &middot;
@Model.ScenesCreated.ToString("N0") scene@(Model.ScenesCreated == 1 ? string.Empty : "s")
@if (coreComplete)
{
@:&middot; @((Model.CharactersCreated + Model.CharactersReused).ToString("N0")) character@((Model.CharactersCreated + Model.CharactersReused) == 1 ? string.Empty : "s")
}
</p>
@if (Model.SceneStructure.Any())
{
<section class="onboarding-complete-next" aria-label="Detected scene structure">
<h2>Detected scene structure</h2>
<div class="onboarding-review-chapters">
@foreach (var chapter in Model.SceneStructure)
{
<details class="onboarding-review-chapter">
<summary>
<span>Chapter @chapter.ChapterNumber</span>
<strong>@chapter.ChapterTitle</strong>
<small>@chapter.SceneCount.ToString("N0") scene@(chapter.SceneCount == 1 ? string.Empty : "s") / @chapter.WordCount.ToString("N0") words</small>
</summary>
@if (chapter.Scenes.Any(scene => !string.IsNullOrWhiteSpace(scene.StructuralSummary)))
{
<ol>
@foreach (var scene in chapter.Scenes)
{
<li>
<strong>@scene.DisplayTitle</strong>
<span>@scene.WordCount.ToString("N0") words</span>
@if (!string.IsNullOrWhiteSpace(scene.StructuralSummary))
{
<p>@scene.StructuralSummary</p>
}
</li>
}
</ol>
}
</details>
}
</div>
</section>
}
@if (coreComplete)
{
<section class="onboarding-complete-next">
<h2>Optional: analyse manuscript</h2>
<p>Story Intelligence can now enrich the existing scenes with summaries, context, relationships, knowledge, timeline details and metrics. You can analyse now or return later.</p>
</section>
}
else
{
<section class="onboarding-complete-next">
<h2>Next: review characters</h2>
<p>Character detection remains part of core import. Review detected names, aliases and existing matches to finish importing the manuscript.</p>
</section>
<section class="onboarding-build-panel onboarding-marker-resync-panel" data-onboarding-build-panel>
<div>
<p class="onboarding-scan-next">Need to repair the Word document?</p>
<p class="onboarding-build-message" data-onboarding-build-message>Resync Word markers uses the existing imported chapters and scenes. Scene detection is not rerun.</p>
</div>
<strong data-onboarding-build-percent></strong>
<div class="onboarding-scan-progress onboarding-build-progress" aria-hidden="true">
<span data-onboarding-build-progress></span>
</div>
<div class="onboarding-manual-save-actions" data-onboarding-manual-save-actions hidden>
<button class="btn btn-primary btn-sm" type="button" data-onboarding-build-save-confirm disabled>
I've saved the Word document
</button>
</div>
</section>
}
<div class="onboarding-actions">
@if (coreComplete)
{
<a class="btn btn-primary" asp-controller="Onboarding" asp-action="StoryIntelligencePlotContext">Analyse my book</a>
<a class="btn btn-outline-secondary" asp-controller="Projects" asp-action="Details" asp-route-id="@Model.ProjectID">Not now</a>
}
else
{
<a class="btn btn-primary" asp-controller="Onboarding" asp-action="ScanCharacters" asp-route-previewId="@Model.PreviewID">Review characters</a>
<button class="btn btn-outline-primary"
type="button"
data-onboarding-build-start
data-onboarding-build-action
data-preview-id="@Model.PreviewID">
Resync Word markers
</button>
}
<a class="btn btn-outline-primary" asp-controller="Projects" asp-action="Details" asp-route-id="@Model.ProjectID">Open Project Overview</a>
<a class="btn btn-outline-secondary" asp-controller="Writer" asp-action="Index" asp-route-projectId="@Model.ProjectID">Open Writer Workspace</a>
</div>
</div>
</section>