@page "/sessions/{Id:long}"
@using DeepDrftPublic.Client.Controls
@inherits ReleaseDetailBase
@(ViewModel.Release?.Title ?? "Session") - DeepDrft
@if (ViewModel.IsLoading)
{
}
else if (ViewModel.NotFound || ViewModel.Release is null)
{
}
else
{
var release = ViewModel.Release;
var heroKey = release.SessionMetadata?.HeroImageEntryKey;
// Hero image precedence: the session's dedicated hero, then the release cover, then a placeholder.
var heroImage = !string.IsNullOrEmpty(heroKey) ? heroKey : release.ImagePath;
var hasGenre = release.Genre is not null;
var hasDate = release.ReleaseDate is not null;
@if (!string.IsNullOrEmpty(heroImage))
{
}
else
{
}
@if (hasGenre)
{
@release.Genre
}
@if (hasDate)
{
Released
@release.ReleaseDate!.Value.ToString("MMMM yyyy")
}
}
@code {
protected override string PersistKey => "session-detail";
}