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,33 @@
using CommunityToolkit.Mvvm.ComponentModel;
using ClaudeDo.Ui.ViewModels.Islands;
namespace ClaudeDo.Ui.ViewModels;
public sealed partial class IslandsShellViewModel : ViewModelBase
{
public ListsIslandViewModel Lists { get; }
public TasksIslandViewModel Tasks { get; }
public DetailsIslandViewModel Details { get; }
[ObservableProperty]
private double _windowWidth = 1280;
public bool ShowDetails => WindowWidth >= 1100;
public bool ShowLists => WindowWidth >= 780;
partial void OnWindowWidthChanged(double value)
{
OnPropertyChanged(nameof(ShowDetails));
OnPropertyChanged(nameof(ShowLists));
}
public IslandsShellViewModel(
ListsIslandViewModel lists,
TasksIslandViewModel tasks,
DetailsIslandViewModel details)
{
Lists = lists; Tasks = tasks; Details = details;
Lists.SelectionChanged += (_, _) => Tasks.LoadForList(Lists.SelectedList);
Tasks.SelectionChanged += (_, _) => Details.Bind(Tasks.SelectedTask);
}
}