@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) {
Session not found.
All sessions
} 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; // Show the cover thumbnail only when it differs from what the hero displays. When there is no // dedicated hero, the hero already falls back to release.ImagePath — rendering the cover too // would duplicate the same image. var showCover = !string.IsNullOrEmpty(release.ImagePath) && release.ImagePath != heroImage; var hasGenre = release.Genre is not null; var hasDate = release.ReleaseDate is not null;
@if (!string.IsNullOrEmpty(heroImage)) { } else { }
@if (showCover) {
}
@if (hasGenre) {
@release.Genre
} @if (hasDate) {
Released @release.ReleaseDate!.Value.ToString("MMMM yyyy")
}
} @code { protected override string PersistKey => "session-detail"; }