PlotDirector/PlotLine/Views/Shared/SceneInspectorV2/_SceneContinuityCard.cshtml
Nick Beckley e48889ac05 Complete desktop workspaces, context menus and plot health
Commit the pending application, help and browser regression work. Pin the patched PKCS dependency for the production release.
2026-10-31 09:27:04 +00:00

53 lines
2.3 KiB
Plaintext

@model SceneEditViewModel
@{
var warningCount = Model.Warnings.Count + Model.AgeContinuityWarnings.Count;
var dependencyCount = Model.DependenciesThisSceneNeeds.Count + Model.DependenciesNeedingThisScene.Count;
var warnings = Model.Warnings.Concat(Model.AgeContinuityWarnings)
.OrderByDescending(x => x.LastDetectedDate)
.ThenByDescending(x => x.CreatedDate)
.ToList();
var lastValidated = Model.Warnings.Concat(Model.AgeContinuityWarnings)
.Select(x => (DateTime?)x.LastDetectedDate)
.OrderByDescending(x => x)
.FirstOrDefault();
}
<article class="scene-inspector-v2-card" data-scene-summary-part="continuity" data-warning-count="@warningCount">
<div class="scene-inspector-v2-card-header">
<div>
<p class="eyebrow">Continuity</p>
<div class="scene-inspector-v2-heading">
<h3>Scene health</h3>
<help-icon key="sceneInspector.warnings" mode="inline" />
</div>
</div>
<button type="button" class="btn btn-sm btn-outline-primary" data-scene-editor="warnings" data-scene-id="@Model.SceneID" data-scene-editor-url="@Url.Action("SceneContinuityEditor", "Warnings", new { sceneId = Model.SceneID })">Review warnings</button>
</div>
<div class="scene-inspector-v2-section">
<span>Continuity health summary</span>
@if (warningCount == 0)
{
<p class="scene-inspector-v2-good-state">No active continuity warnings for this scene.</p>
@if (lastValidated.HasValue)
{
<p class="muted">Last checked @lastValidated.Value.ToString("d MMM yyyy HH:mm").</p>
}
@if (dependencyCount > 0)
{
<p class="muted">@dependencyCount scene dependenc@(dependencyCount == 1 ? "y" : "ies") linked.</p>
}
}
else
{
<p class="scene-inspector-v2-warning-state">@warningCount warning@(warningCount == 1 ? "" : "s") need review.</p>
<ul class="scene-inspector-v2-compact-list">
@foreach (var warning in warnings)
{
<li><strong>@warning.WarningTypeName</strong> @warning.Message</li>
}
</ul>
}
</div>
</article>