refactor(ui): migrate AboutModal to ModalShell

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mika kuns
2026-05-30 16:44:41 +02:00
parent 8d07fc298c
commit 538839c004

View File

@@ -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.AboutModalView" x:Class="ClaudeDo.Ui.Views.Modals.AboutModalView"
x:DataType="vm:AboutModalViewModel" x:DataType="vm:AboutModalViewModel"
Title="About ClaudeDo" Title="About ClaudeDo"
@@ -12,18 +13,16 @@
<Window.KeyBindings> <Window.KeyBindings>
<KeyBinding Gesture="Escape" Command="{Binding CloseCommand}"/> <KeyBinding Gesture="Escape" Command="{Binding CloseCommand}"/>
</Window.KeyBindings> </Window.KeyBindings>
<Border BorderBrush="{DynamicResource LineBrush}" BorderThickness="1">
<Grid RowDefinitions="36,*,52"> <ctl:ModalShell Title="ABOUT" CloseCommand="{Binding CloseCommand}">
<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" VerticalAlignment="Center" Margin="16,0">
<Grid ColumnDefinitions="*,Auto" Margin="14,0"> <Button Content="Close" Command="{Binding CloseCommand}" MinWidth="90"/>
<TextBlock Text="ABOUT" FontFamily="{DynamicResource MonoFont}" FontSize="11" </StackPanel>
LetterSpacing="1.4" Foreground="{DynamicResource TextBrush}" VerticalAlignment="Center"/> </ctl:ModalShell.Footer>
<Button Grid.Column="1" Classes="icon-btn" Content="✕" FontSize="12"
Command="{Binding CloseCommand}" VerticalAlignment="Center"/> <!-- Body -->
</Grid> <ScrollViewer Padding="20,16" HorizontalScrollBarVisibility="Disabled">
</Border>
<ScrollViewer Grid.Row="1" Padding="20,16" HorizontalScrollBarVisibility="Disabled">
<Grid RowDefinitions="Auto,Auto,Auto,Auto" ColumnDefinitions="90,*,Auto" RowSpacing="10" ColumnSpacing="8"> <Grid RowDefinitions="Auto,Auto,Auto,Auto" ColumnDefinitions="90,*,Auto" RowSpacing="10" ColumnSpacing="8">
<TextBlock Grid.Row="0" Grid.Column="0" Text="Version" Foreground="{DynamicResource TextDimBrush}" VerticalAlignment="Center"/> <TextBlock Grid.Row="0" Grid.Column="0" Text="Version" Foreground="{DynamicResource TextDimBrush}" VerticalAlignment="Center"/>
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding AppVersion}" FontFamily="{DynamicResource MonoFont}" VerticalAlignment="Center"/> <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding AppVersion}" FontFamily="{DynamicResource MonoFont}" VerticalAlignment="Center"/>
@@ -38,12 +37,6 @@
<Button Grid.Row="3" Grid.Column="2" Content="Open" Command="{Binding OpenPathCommand}" CommandParameter="{Binding WorkerConfigPath}"/> <Button Grid.Row="3" Grid.Column="2" Content="Open" Command="{Binding OpenPathCommand}" CommandParameter="{Binding WorkerConfigPath}"/>
</Grid> </Grid>
</ScrollViewer> </ScrollViewer>
<Border Grid.Row="2" Background="{DynamicResource DeepBrush}"
BorderBrush="{DynamicResource LineBrush}" BorderThickness="0,1,0,0"> </ctl:ModalShell>
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="16,0">
<Button Content="Close" Command="{Binding CloseCommand}" MinWidth="90"/>
</StackPanel>
</Border>
</Grid>
</Border>
</Window> </Window>