refactor(ui): migrate RepoImportModal to ModalShell
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<Window xmlns="https://github.com/avaloniaui"
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Modals"
|
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Modals"
|
||||||
|
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
||||||
x:Class="ClaudeDo.Ui.Views.Modals.RepoImportModalView"
|
x:Class="ClaudeDo.Ui.Views.Modals.RepoImportModalView"
|
||||||
x:DataType="vm:RepoImportModalViewModel"
|
x:DataType="vm:RepoImportModalViewModel"
|
||||||
Title="Add repos as lists"
|
Title="Add repos as lists"
|
||||||
@@ -12,22 +13,21 @@
|
|||||||
<Window.KeyBindings>
|
<Window.KeyBindings>
|
||||||
<KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
|
<KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
|
||||||
</Window.KeyBindings>
|
</Window.KeyBindings>
|
||||||
<Border BorderBrush="{DynamicResource LineBrush}" BorderThickness="1">
|
|
||||||
<Grid RowDefinitions="36,Auto,*,52">
|
|
||||||
|
|
||||||
<!-- Header -->
|
<ctl:ModalShell Title="ADD REPOS AS LISTS" CloseCommand="{Binding CancelCommand}">
|
||||||
<Border Grid.Row="0" Background="{DynamicResource DeepBrush}"
|
<ctl:ModalShell.Footer>
|
||||||
BorderBrush="{DynamicResource LineBrush}" BorderThickness="0,0,0,1">
|
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Right"
|
||||||
<Grid ColumnDefinitions="*,Auto" Margin="14,0">
|
VerticalAlignment="Center" Margin="16,0">
|
||||||
<TextBlock Text="ADD REPOS AS LISTS" FontFamily="{DynamicResource MonoFont}" FontSize="11"
|
<Button Content="Cancel" Command="{Binding CancelCommand}" MinWidth="90"/>
|
||||||
LetterSpacing="1.4" Foreground="{DynamicResource TextBrush}" VerticalAlignment="Center"/>
|
<Button Content="{Binding CreateButtonText}" Command="{Binding CreateCommand}"
|
||||||
<Button Grid.Column="1" Classes="icon-btn" Content="✕" FontSize="12"
|
IsEnabled="{Binding CanCreate}" MinWidth="120" Classes="primary"/>
|
||||||
Command="{Binding CancelCommand}" VerticalAlignment="Center"/>
|
</StackPanel>
|
||||||
</Grid>
|
</ctl:ModalShell.Footer>
|
||||||
</Border>
|
|
||||||
|
|
||||||
|
<!-- Body: toolbar + checklist -->
|
||||||
|
<DockPanel>
|
||||||
<!-- Toolbar: search + folder actions -->
|
<!-- Toolbar: search + folder actions -->
|
||||||
<StackPanel Grid.Row="1" Spacing="8" Margin="16,12,16,6">
|
<StackPanel DockPanel.Dock="Top" Spacing="8" Margin="16,12,16,6">
|
||||||
<TextBox Text="{Binding SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
<TextBox Text="{Binding SearchText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
||||||
PlaceholderText="Search repos…"/>
|
PlaceholderText="Search repos…"/>
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Repo checklist -->
|
<!-- Repo checklist -->
|
||||||
<ScrollViewer Grid.Row="2" Padding="16,2,16,8">
|
<ScrollViewer Padding="16,2,16,8">
|
||||||
<ItemsControl ItemsSource="{Binding Repos}">
|
<ItemsControl ItemsSource="{Binding Repos}">
|
||||||
<ItemsControl.ItemTemplate>
|
<ItemsControl.ItemTemplate>
|
||||||
<DataTemplate DataType="vm:RepoImportItemViewModel">
|
<DataTemplate DataType="vm:RepoImportItemViewModel">
|
||||||
@@ -50,15 +50,15 @@
|
|||||||
IsEnabled="{Binding CanToggle}"
|
IsEnabled="{Binding CanToggle}"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||||
Foreground="{DynamicResource TextBrush}" FontSize="12"
|
Foreground="{DynamicResource TextBrush}" FontSize="{StaticResource FontSizeBody}"
|
||||||
VerticalAlignment="Center" Margin="4,0,0,0"/>
|
VerticalAlignment="Center" Margin="4,0,0,0"/>
|
||||||
<TextBlock Grid.Column="2" Text="{Binding FullPath}"
|
<TextBlock Grid.Column="2" Text="{Binding FullPath}"
|
||||||
Foreground="{DynamicResource TextFaintBrush}"
|
Foreground="{DynamicResource TextFaintBrush}"
|
||||||
FontFamily="{DynamicResource MonoFont}" FontSize="10"
|
FontFamily="{DynamicResource MonoFont}" FontSize="{StaticResource FontSizeEyebrow}"
|
||||||
TextTrimming="CharacterEllipsis"
|
TextTrimming="CharacterEllipsis"
|
||||||
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
VerticalAlignment="Center" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="3" Text="(already added)"
|
<TextBlock Grid.Column="3" Text="(already added)"
|
||||||
Foreground="{DynamicResource TextFaintBrush}" FontSize="10"
|
Foreground="{DynamicResource TextFaintBrush}" FontSize="{StaticResource FontSizeEyebrow}"
|
||||||
VerticalAlignment="Center" Margin="8,0,0,0"
|
VerticalAlignment="Center" Margin="8,0,0,0"
|
||||||
IsVisible="{Binding AlreadyAdded}"/>
|
IsVisible="{Binding AlreadyAdded}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -66,18 +66,7 @@
|
|||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
</DockPanel>
|
||||||
|
|
||||||
<!-- Footer -->
|
</ctl:ModalShell>
|
||||||
<Border Grid.Row="3" Background="{DynamicResource DeepBrush}"
|
|
||||||
BorderBrush="{DynamicResource LineBrush}" BorderThickness="0,1,0,0">
|
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Center" Margin="16,0">
|
|
||||||
<Button Content="Cancel" Command="{Binding CancelCommand}" MinWidth="90"/>
|
|
||||||
<Button Content="{Binding CreateButtonText}" Command="{Binding CreateCommand}"
|
|
||||||
IsEnabled="{Binding CanCreate}" MinWidth="120" Classes="primary"/>
|
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
Reference in New Issue
Block a user