feat(ui): scaffold islands shell and child VMs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
12
src/ClaudeDo.Ui/ViewModels/Islands/ListNavItemViewModel.cs
Normal file
12
src/ClaudeDo.Ui/ViewModels/Islands/ListNavItemViewModel.cs
Normal 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; }
|
||||
}
|
||||
11
src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs
Normal file
11
src/ClaudeDo.Ui/ViewModels/Islands/ListsIslandViewModel.cs
Normal 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);
|
||||
}
|
||||
10
src/ClaudeDo.Ui/ViewModels/Islands/TaskRowViewModel.cs
Normal file
10
src/ClaudeDo.Ui/ViewModels/Islands/TaskRowViewModel.cs
Normal 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;
|
||||
}
|
||||
12
src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs
Normal file
12
src/ClaudeDo.Ui/ViewModels/Islands/TasksIslandViewModel.cs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user