8.L: collapse release/track name for single-track media (Session, Mix)
BatchTrackDetail gains ShowTrackName parameter (default true); BatchUpload removes the Track Name input on the single-track path; BatchEdit suppresses it there too. Both sync _tracks[0].TrackName = _albumName on submit/save so names can never diverge. Cut path unchanged.
This commit is contained in:
@@ -5,14 +5,17 @@
|
||||
else
|
||||
{
|
||||
<MudStack Spacing="4">
|
||||
<MudTextField Value="SelectedTrack.TrackName"
|
||||
ValueChanged="@((string v) => TrackNameChanged.InvokeAsync(v))"
|
||||
T="string"
|
||||
Label="Track Name"
|
||||
Required="true"
|
||||
RequiredError="Track Name is required"
|
||||
Variant="Variant.Outlined"
|
||||
Disabled="Disabled" />
|
||||
@if (ShowTrackName)
|
||||
{
|
||||
<MudTextField Value="SelectedTrack.TrackName"
|
||||
ValueChanged="@((string v) => TrackNameChanged.InvokeAsync(v))"
|
||||
T="string"
|
||||
Label="Track Name"
|
||||
Required="true"
|
||||
RequiredError="Track Name is required"
|
||||
Variant="Variant.Outlined"
|
||||
Disabled="Disabled" />
|
||||
}
|
||||
|
||||
@if (SelectedTrack.Id.HasValue)
|
||||
{
|
||||
@@ -46,6 +49,12 @@ else
|
||||
[Parameter] public BatchRowModel? SelectedTrack { get; set; }
|
||||
[Parameter] public bool Disabled { get; set; }
|
||||
[Parameter] public EventCallback<string> TrackNameChanged { get; set; }
|
||||
/// <summary>
|
||||
/// When false (single-track Session/Mix), the Track Name field is suppressed — the name is
|
||||
/// derived from the Release Name by the parent form and never entered independently.
|
||||
/// Defaults to true so the Cut multi-track path is unchanged.
|
||||
/// </summary>
|
||||
[Parameter] public bool ShowTrackName { get; set; } = true;
|
||||
|
||||
private static string FormatBytes(long bytes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user