76 lines
3.0 KiB
Plaintext
76 lines
3.0 KiB
Plaintext
@model SceneEditViewModel
|
|
@{
|
|
var primaryLocation = Model.LocationOptions.FirstOrDefault(x => x.Value == Model.PrimaryLocationID?.ToString())?.Text?.Trim();
|
|
var locationNames = new[] { primaryLocation }.Where(x => !string.IsNullOrWhiteSpace(x))
|
|
.Select(x => x!)
|
|
.Concat(Model.SceneCharacters.Where(x => !string.IsNullOrWhiteSpace(x.LocationName)).Select(x => x.LocationName!))
|
|
.Concat(Model.SceneAssetLocations.Where(x => !string.IsNullOrWhiteSpace(x.LocationName)).Select(x => x.LocationName!))
|
|
.Distinct(StringComparer.OrdinalIgnoreCase)
|
|
.ToList();
|
|
var assetNames = Model.AssetEvents.Select(x => x.AssetName).Where(x => !string.IsNullOrWhiteSpace(x)).Distinct(StringComparer.OrdinalIgnoreCase).ToList();
|
|
}
|
|
|
|
<article class="scene-inspector-v2-card" data-scene-summary-part="world">
|
|
<div class="scene-inspector-v2-card-header">
|
|
<div>
|
|
<p class="eyebrow">World</p>
|
|
<h3>Locations and assets</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scene-inspector-v2-section">
|
|
<span>Locations</span>
|
|
@if (!locationNames.Any())
|
|
{
|
|
<p class="muted">No scene locations have been assigned yet.</p>
|
|
}
|
|
else
|
|
{
|
|
<div class="scene-inspector-v2-chip-row">
|
|
@foreach (var location in locationNames.Take(8))
|
|
{
|
|
<span>@location</span>
|
|
}
|
|
</div>
|
|
}
|
|
</div>
|
|
|
|
<div class="scene-inspector-v2-section">
|
|
<span>Assets</span>
|
|
@if (!assetNames.Any())
|
|
{
|
|
<p class="muted">No story assets appear in this scene yet.</p>
|
|
}
|
|
else
|
|
{
|
|
<ul class="scene-inspector-v2-list">
|
|
@foreach (var asset in assetNames.Take(6))
|
|
{
|
|
<li><strong>@asset</strong></li>
|
|
}
|
|
</ul>
|
|
}
|
|
</div>
|
|
|
|
<div class="scene-inspector-v2-counts">
|
|
<div>
|
|
<span>Asset events</span>
|
|
<strong>@Model.AssetEvents.Count</strong>
|
|
</div>
|
|
<div>
|
|
<span>Custody entries</span>
|
|
<strong>@Model.AssetCustodyEvents.Count</strong>
|
|
</div>
|
|
<div>
|
|
<span>Placed assets</span>
|
|
<strong>@Model.SceneAssetLocations.Count</strong>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="scene-inspector-v2-actions">
|
|
<button type="button" class="btn btn-sm btn-outline-primary" data-scene-editor="locations" data-scene-id="@Model.SceneID" data-scene-editor-url="@Url.Action("SceneLocationsEditor", "Scenes", new { sceneId = Model.SceneID })">Manage locations</button>
|
|
<button type="button" class="btn btn-sm btn-outline-primary" data-scene-editor="assets" data-scene-id="@Model.SceneID" data-scene-editor-url="@Url.Action("SceneAssetsEditor", "Scenes", new { sceneId = Model.SceneID })">Manage assets</button>
|
|
<button type="button" class="btn btn-sm btn-outline-primary" data-scene-editor="custody" data-scene-id="@Model.SceneID">Manage custody</button>
|
|
</div>
|
|
</article>
|