feat(ui): scaffold islands shell and child VMs

This commit is contained in:
mika kuns
2026-04-20 10:15:05 +02:00
parent 55917c921a
commit 8909119d1b
7 changed files with 94 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace ClaudeDo.Ui.ViewModels.Islands;
public sealed partial class DetailsIslandViewModel : ViewModelBase
{
[ObservableProperty] private TaskRowViewModel? _task;
public void Bind(TaskRowViewModel? task) => Task = task;
}

View File

@@ -0,0 +1,12 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace ClaudeDo.Ui.ViewModels.Islands;
public sealed partial class ListNavItemViewModel : ViewModelBase
{
public required string Id { get; init; }
public required string Name { get; init; }
[ObservableProperty] private int _count;
[ObservableProperty] private bool _isActive;
public string? IconKey { get; init; }
}

View File

@@ -0,0 +1,11 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace ClaudeDo.Ui.ViewModels.Islands;
public sealed partial class ListsIslandViewModel : ViewModelBase
{
public event EventHandler? SelectionChanged;
[ObservableProperty] private ListNavItemViewModel? _selectedList;
partial void OnSelectedListChanged(ListNavItemViewModel? value) =>
SelectionChanged?.Invoke(this, EventArgs.Empty);
}

View File

@@ -0,0 +1,10 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace ClaudeDo.Ui.ViewModels.Islands;
public sealed partial class TaskRowViewModel : ViewModelBase
{
public required string Id { get; init; }
[ObservableProperty] private string _title = "";
[ObservableProperty] private bool _done;
}

View File

@@ -0,0 +1,12 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace ClaudeDo.Ui.ViewModels.Islands;
public sealed partial class TasksIslandViewModel : ViewModelBase
{
public event EventHandler? SelectionChanged;
[ObservableProperty] private TaskRowViewModel? _selectedTask;
public void LoadForList(ListNavItemViewModel? list) { /* Phase 5 */ }
partial void OnSelectedTaskChanged(TaskRowViewModel? value) =>
SelectionChanged?.Invoke(this, EventArgs.Empty);
}