refactor(ui): migrate PlanningDiffView 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"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:ClaudeDo.Ui.ViewModels.Planning"
|
||||
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
||||
x:Class="ClaudeDo.Ui.Views.Planning.PlanningDiffView"
|
||||
x:DataType="vm:PlanningDiffViewModel"
|
||||
Title="Planning — Combined diff"
|
||||
@@ -14,32 +15,11 @@
|
||||
<KeyBinding Gesture="Escape" Command="{Binding CloseCommand}"/>
|
||||
</Window.KeyBindings>
|
||||
|
||||
<Border Background="{DynamicResource SurfaceBrush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="1">
|
||||
<Grid RowDefinitions="36,Auto,*">
|
||||
<ctl:ModalShell Title="PLANNING — COMBINED DIFF" CloseCommand="{Binding CloseCommand}">
|
||||
|
||||
<!-- Title bar / drag handle -->
|
||||
<Border Grid.Row="0"
|
||||
x:Name="TitleBar"
|
||||
Background="{DynamicResource Surface2Brush}"
|
||||
BorderBrush="{DynamicResource LineBrush}"
|
||||
BorderThickness="0,0,0,1"
|
||||
PointerPressed="TitleBar_PointerPressed">
|
||||
<Grid ColumnDefinitions="*,Auto" Margin="14,0">
|
||||
<TextBlock Classes="title" Text="Planning — Combined diff"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Grid.Column="1"
|
||||
Classes="icon-btn"
|
||||
Content="✕"
|
||||
FontSize="{StaticResource FontSizeBody}"
|
||||
Command="{Binding CloseCommand}"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Toolbar row -->
|
||||
<StackPanel Grid.Row="1"
|
||||
<!-- Toolbar row -->
|
||||
<DockPanel>
|
||||
<StackPanel DockPanel.Dock="Top"
|
||||
Orientation="Horizontal"
|
||||
Spacing="8"
|
||||
Margin="8,6">
|
||||
@@ -54,7 +34,7 @@
|
||||
</StackPanel>
|
||||
|
||||
<!-- Two-pane body -->
|
||||
<Grid Grid.Row="2" ColumnDefinitions="240,*">
|
||||
<Grid ColumnDefinitions="240,*">
|
||||
|
||||
<!-- Subtask list (left pane) -->
|
||||
<Border Grid.Column="0"
|
||||
@@ -95,6 +75,7 @@
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
|
||||
</ctl:ModalShell>
|
||||
</Window>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using ClaudeDo.Ui.ViewModels.Planning;
|
||||
|
||||
namespace ClaudeDo.Ui.Views.Planning;
|
||||
@@ -18,10 +16,4 @@ public partial class PlanningDiffView : Window
|
||||
if (DataContext is PlanningDiffViewModel vm)
|
||||
vm.CloseAction = Close;
|
||||
}
|
||||
|
||||
private void TitleBar_PointerPressed(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
|
||||
BeginMoveDrag(e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user