Folders render above the top-level lists, each with its own collapsible children; tapping a folder header folds it instead of selecting it. Lists move in by dragging onto a folder header (or onto a row inside it) and out by dropping between top-level rows or via the context menu. Creating a folder is a toggle in the New-list modal, not a third sidebar button: it reduces the modal to name + icon and writes a folder row instead of the list row the create flow pre-created.
32 lines
1.7 KiB
C#
32 lines
1.7 KiB
C#
using ClaudeDo.Data.Models;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
namespace ClaudeDo.Ui.ViewModels.Islands;
|
|
|
|
public sealed partial class ListNavItemViewModel : ViewModelBase
|
|
{
|
|
public required string Id { get; init; }
|
|
public required ListKind Kind { get; init; }
|
|
[ObservableProperty] private string _name = "";
|
|
[ObservableProperty] private int _count;
|
|
[ObservableProperty] private bool _isActive;
|
|
[ObservableProperty] private string? _workingDir;
|
|
[ObservableProperty] private string _defaultCommitType = CommitTypeRegistry.DefaultType;
|
|
// Reminder list: tasks created here default to manual.
|
|
[ObservableProperty] private bool _isManual;
|
|
// Whether this list's .claudedo/ findings folder is committed with the repo (ListEntity.FindingsTracked).
|
|
[ObservableProperty] private bool _findingsTracked;
|
|
// True when a ticket-system base URL is configured AND this list has a linked ticket project
|
|
// (ListConfigEntity.TicketProjectId) — gates the "Update from ticket system" context menu entry.
|
|
[ObservableProperty] private bool _hasTicketProject;
|
|
[ObservableProperty] private bool _dropHintAbove;
|
|
[ObservableProperty] private bool _dropHintBelow;
|
|
// Set while a dragged task hovers over this row as a move target — distinct from
|
|
// DropHintAbove/Below, which mark an insertion point for list reordering.
|
|
[ObservableProperty] private bool _isTaskDropTarget;
|
|
// Settable (not init) so a list-settings icon change refreshes the row in place.
|
|
[ObservableProperty] private string? _iconKey;
|
|
// The sidebar folder this row sits in (ListEntity.FolderId); null = top level.
|
|
[ObservableProperty] private string? _folderId;
|
|
}
|