fix(cms): gate Session hero input to upload path; warn (not error) on missing hero
Edit forms (BatchEdit/TrackEdit/TrackNew) show the guidance alert instead of an inert picker, via an AllowHeroUpload flag. Missing-hero nudge is Severity.Warning; null-ReleaseId hero drop is now logged.
This commit is contained in:
@@ -68,6 +68,7 @@
|
||||
@bind-ReleaseType="ReleaseTypeBinding"
|
||||
HeroImageFile="HeroImageFile"
|
||||
HeroImageFileChanged="HeroImageFileChanged"
|
||||
AllowHeroUpload="AllowHeroUpload"
|
||||
Disabled="Disabled" />
|
||||
</MudPaper>
|
||||
|
||||
@@ -92,6 +93,10 @@
|
||||
[Parameter] public IBrowserFile? HeroImageFile { get; set; }
|
||||
[Parameter] public EventCallback<IBrowserFile?> HeroImageFileChanged { get; set; }
|
||||
|
||||
// Gates the hero file picker in SessionFields (threaded to MediumFields → SessionFields).
|
||||
// Set true only on the BatchUpload create path; leave false/absent on all edit paths.
|
||||
[Parameter] public bool AllowHeroUpload { get; set; }
|
||||
|
||||
// BatchEdit only: when set (and no new file picked), preview the release's current cover.
|
||||
// The parent nulls this to drop the preview when the admin clears the existing cover.
|
||||
[Parameter] public string? ExistingImagePath { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user