feat(ui): Lists island view with search and nav items
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,36 @@
|
|||||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Islands"
|
||||||
x:Class="ClaudeDo.Ui.Views.Islands.ListsIslandView"
|
x:Class="ClaudeDo.Ui.Views.Islands.ListsIslandView"
|
||||||
x:DataType="vm:ListsIslandViewModel">
|
x:DataType="vm:ListsIslandViewModel">
|
||||||
<TextBlock Margin="14" Text="Lists (placeholder)"
|
<DockPanel LastChildFill="True">
|
||||||
Foreground="{DynamicResource TextDimBrush}"/>
|
<Border DockPanel.Dock="Top" Classes="island-header">
|
||||||
|
<StackPanel Spacing="6" Margin="14,12">
|
||||||
|
<TextBlock Classes="eyebrow" Text="WORKSPACE"/>
|
||||||
|
<TextBlock FontFamily="{DynamicResource SansFamily}" FontSize="18"
|
||||||
|
FontWeight="SemiBold" Foreground="{DynamicResource TextBrush}"
|
||||||
|
Text="Lists"/>
|
||||||
|
<TextBox Classes="search" Margin="0,8,0,0" PlaceholderText="Search…"
|
||||||
|
Text="{Binding SearchText, Mode=TwoWay}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
<ScrollViewer>
|
||||||
|
<ItemsControl ItemsSource="{Binding Items}" Margin="6">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate DataType="vm:ListNavItemViewModel">
|
||||||
|
<Border Classes="list-item" Classes.active="{Binding IsActive}"
|
||||||
|
Tapped="OnItemTapped">
|
||||||
|
<Grid ColumnDefinitions="20,*,Auto" Margin="10,8">
|
||||||
|
<PathIcon Grid.Column="0" Width="14" Height="14"/>
|
||||||
|
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||||
|
VerticalAlignment="Center" Margin="8,0"
|
||||||
|
Foreground="{DynamicResource TextBrush}" FontSize="13"/>
|
||||||
|
<TextBlock Grid.Column="2" Text="{Binding Count}"
|
||||||
|
FontFamily="{DynamicResource MonoFamily}" FontSize="10"
|
||||||
|
Foreground="{DynamicResource TextFaintBrush}"/>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
</ScrollViewer>
|
||||||
|
</DockPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
|
using ClaudeDo.Ui.ViewModels.Islands;
|
||||||
|
|
||||||
namespace ClaudeDo.Ui.Views.Islands;
|
namespace ClaudeDo.Ui.Views.Islands;
|
||||||
|
|
||||||
public partial class ListsIslandView : UserControl
|
public partial class ListsIslandView : UserControl
|
||||||
{
|
{
|
||||||
public ListsIslandView() { InitializeComponent(); }
|
public ListsIslandView() { InitializeComponent(); }
|
||||||
|
|
||||||
|
private void OnItemTapped(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is Border { DataContext: ListNavItemViewModel item }
|
||||||
|
&& DataContext is ListsIslandViewModel vm)
|
||||||
|
vm.SelectCommand.Execute(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user