Changed Added image fields for Characters and Story Assets in models, view models, repositories, services, and save flows. Added reusable avatar/initials rendering via [AvatarHelper.cs](C:/Source/PlotLine/PlotLine/Services/AvatarHelper.cs) and [_Avatar.cshtml](C:/Source/PlotLine/PlotLine/Views/Shared/_Avatar.cshtml). Added upload/remove processing through existing upload storage in [VisualIdentityImageService.cs](C:/Source/PlotLine/PlotLine/Services/VisualIdentityImageService.cs). Updated Character and Story Asset list/detail/edit views with thumbnails, initials fallback, upload, replace, and remove controls. Added styling in [site.css](C:/Source/PlotLine/PlotLine/wwwroot/css/site.css) and refreshed site.min.css. Database Added new migration [079_VisualIdentityCharacterAssetImages.sql](C:/Source/PlotLine/PlotLine/Sql/079_VisualIdentityCharacterAssetImages.sql). Adds nullable ImagePath and ThumbnailPath to Characters and StoryAssets. Applied locally and confirmed the columns exist. Stored Procedures Updated active procedure definitions only: Character_ListByProject Character_Get Character_Save Character_UpdateImage StoryAsset_ListByProject StoryAsset_Get StoryAsset_Save StoryAsset_UpdateImage
17 lines
514 B
Plaintext
17 lines
514 B
Plaintext
@model AvatarViewModel
|
|
@{
|
|
var imagePath = !string.IsNullOrWhiteSpace(Model.ThumbnailPath) ? Model.ThumbnailPath : Model.ImagePath;
|
|
var cssClass = $"visual-avatar visual-avatar--{Model.Size} {Model.CssClass}".Trim();
|
|
}
|
|
|
|
<span class="@cssClass" title="@Model.DisplayName">
|
|
@if (!string.IsNullOrWhiteSpace(imagePath))
|
|
{
|
|
<img src="@imagePath" alt="" loading="@(Model.Lazy ? "lazy" : "eager")" />
|
|
}
|
|
else
|
|
{
|
|
<span>@AvatarHelper.Initials(Model.DisplayName)</span>
|
|
}
|
|
</span>
|