feat: add BatchEdit page and extract reusable batch sub-components from BatchUpload
fix: TrackNumber sort case, stale _imagePath reset, skip Done rows on retry in BatchEdit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
|
||||
namespace DeepDrftManager.Components.Pages.Tracks;
|
||||
|
||||
/// <summary>
|
||||
/// A single track row shared by <c>BatchUpload</c> (all rows are new uploads) and
|
||||
/// <c>BatchEdit</c> (existing rows carry <see cref="Id"/>; admins may also add new upload rows).
|
||||
/// </summary>
|
||||
public class BatchRowModel
|
||||
{
|
||||
/// <summary>SQL id of an existing track. <c>null</c> means a new row to upload.</summary>
|
||||
public long? Id { get; set; }
|
||||
|
||||
/// <summary>Vault entry key — existing rows only.</summary>
|
||||
public string? EntryKey { get; set; }
|
||||
|
||||
/// <summary>Original upload filename — existing rows only, read-only display.</summary>
|
||||
public string? OriginalFileName { get; set; }
|
||||
|
||||
/// <summary>Selected WAV — new rows only.</summary>
|
||||
public IBrowserFile? WavFile { get; set; }
|
||||
|
||||
public string TrackName { get; set; } = string.Empty;
|
||||
|
||||
public int TrackNumber { get; set; }
|
||||
|
||||
public BatchRowStatus Status { get; set; } = BatchRowStatus.Queued;
|
||||
|
||||
public string? ErrorMessage { get; set; }
|
||||
}
|
||||
|
||||
public enum BatchRowStatus { Queued, Uploading, Done, Failed }
|
||||
Reference in New Issue
Block a user