style(ui): subtasks, notes, details metadata footer
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,12 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
|
||||
private CancellationTokenSource? _loadCts;
|
||||
|
||||
// Set by shell so CloseDetailCommand can clear SelectedTask
|
||||
public Action? CloseDetail { get; set; }
|
||||
|
||||
// Set by shell so DeleteTaskCommand can remove from list
|
||||
public Func<TaskRowViewModel, System.Threading.Tasks.Task>? DeleteFromList { get; set; }
|
||||
|
||||
// Set by the view so OpenDiffCommand can show the modal as a dialog
|
||||
public Func<DiffModalViewModel, System.Threading.Tasks.Task>? ShowDiffModal { get; set; }
|
||||
|
||||
@@ -198,6 +204,34 @@ public sealed partial class DetailsIslandViewModel : ViewModelBase
|
||||
await System.Threading.Tasks.Task.CompletedTask;
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private void CloseDetails() => CloseDetail?.Invoke();
|
||||
|
||||
[RelayCommand]
|
||||
private async System.Threading.Tasks.Task DeleteTaskAsync()
|
||||
{
|
||||
if (Task == null) return;
|
||||
var row = Task;
|
||||
await using var ctx = _dbFactory.CreateDbContext();
|
||||
var repo = new TaskRepository(ctx);
|
||||
await repo.DeleteAsync(row.Id);
|
||||
if (DeleteFromList != null)
|
||||
await DeleteFromList(row);
|
||||
CloseDetail?.Invoke();
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async System.Threading.Tasks.Task SaveNotesAsync()
|
||||
{
|
||||
if (Task == null) return;
|
||||
await using var ctx = _dbFactory.CreateDbContext();
|
||||
var repo = new TaskRepository(ctx);
|
||||
var entity = await repo.GetByIdAsync(Task.Id);
|
||||
if (entity == null) return;
|
||||
entity.Notes = Notes;
|
||||
await repo.UpdateAsync(entity);
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async System.Threading.Tasks.Task ApproveMergeAsync()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user