feat(ui): tasks island with rows, chips, add-task, selection
TaskRowView with status chip (EqStatus converter + parameter), StrikeIfTrue, NotNullToBool converters. TasksIslandView with header, add-task TextBox (Enter=AddCommand), ItemsControl + flat Button for selection. Converters registered in App.axaml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,47 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||
xmlns:islands="using:ClaudeDo.Ui.Views.Islands"
|
||||
x:Class="ClaudeDo.Ui.Views.Islands.TasksIslandView"
|
||||
x:DataType="vm:TasksIslandViewModel">
|
||||
<TextBlock Margin="14" Text="Tasks (placeholder)"
|
||||
Foreground="{DynamicResource TextDimBrush}"/>
|
||||
<DockPanel LastChildFill="True">
|
||||
|
||||
<!-- Header -->
|
||||
<Border DockPanel.Dock="Top" Classes="island-header">
|
||||
<StackPanel Margin="18,14" Spacing="4">
|
||||
<TextBlock Classes="eyebrow" Text="{Binding HeaderEyebrow}"/>
|
||||
<TextBlock FontFamily="{DynamicResource SansFamily}" FontSize="24"
|
||||
FontWeight="SemiBold" Foreground="{DynamicResource TextBrush}"
|
||||
Text="{Binding HeaderTitle}"/>
|
||||
<TextBlock FontFamily="{DynamicResource MonoFamily}" FontSize="11"
|
||||
Foreground="{DynamicResource TextMuteBrush}" Text="{Binding Subtitle}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Add-task row -->
|
||||
<Border DockPanel.Dock="Top" Margin="18,8,18,4">
|
||||
<TextBox Watermark="Add a task…" Text="{Binding NewTaskTitle, Mode=TwoWay}">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Gesture="Enter" Command="{Binding AddCommand}"/>
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
</Border>
|
||||
|
||||
<!-- Task list -->
|
||||
<ScrollViewer>
|
||||
<ItemsControl ItemsSource="{Binding Items}" Margin="10,4">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="vm:TaskRowViewModel">
|
||||
<Button Classes="flat" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
Command="{Binding $parent[ItemsControl].DataContext.SelectCommand}"
|
||||
CommandParameter="{Binding}">
|
||||
<islands:TaskRowView/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user