refactor(ui): migrate UnfinishedPlanningModal 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="clr-namespace:ClaudeDo.Ui.ViewModels.Modals"
|
xmlns:vm="clr-namespace:ClaudeDo.Ui.ViewModels.Modals"
|
||||||
|
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
||||||
x:Class="ClaudeDo.Ui.Views.Modals.UnfinishedPlanningModalView"
|
x:Class="ClaudeDo.Ui.Views.Modals.UnfinishedPlanningModalView"
|
||||||
x:DataType="vm:UnfinishedPlanningModalViewModel"
|
x:DataType="vm:UnfinishedPlanningModalViewModel"
|
||||||
Title="Unfinished planning session"
|
Title="Unfinished planning session"
|
||||||
@@ -15,68 +16,28 @@
|
|||||||
<KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
|
<KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
|
||||||
</Window.KeyBindings>
|
</Window.KeyBindings>
|
||||||
|
|
||||||
<Window.Styles>
|
<ctl:ModalShell Title="UNFINISHED PLANNING SESSION" CloseCommand="{Binding CancelCommand}">
|
||||||
<Style Selector="Button.primary">
|
<ctl:ModalShell.Footer>
|
||||||
<Setter Property="Background" Value="{DynamicResource AccentBrush}"/>
|
<StackPanel Orientation="Horizontal" Spacing="8"
|
||||||
<Setter Property="Foreground" Value="{DynamicResource DeepBrush}"/>
|
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||||
<Setter Property="FontWeight" Value="SemiBold"/>
|
Margin="16,0">
|
||||||
</Style>
|
<Button Content="Discard" Command="{Binding DiscardCommand}" MinWidth="80"/>
|
||||||
</Window.Styles>
|
<Button Content="Finalize" Command="{Binding FinalizeNowCommand}" MinWidth="80"/>
|
||||||
|
<Button Content="Resume" Command="{Binding ResumeCommand}" Classes="primary" MinWidth="80"/>
|
||||||
<Border Background="{DynamicResource SurfaceBrush}"
|
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
|
||||||
BorderThickness="1">
|
|
||||||
<Grid RowDefinitions="36,*,52">
|
|
||||||
|
|
||||||
<!-- Title bar -->
|
|
||||||
<Border Grid.Row="0"
|
|
||||||
x:Name="TitleBar"
|
|
||||||
Background="{DynamicResource DeepBrush}"
|
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
|
||||||
BorderThickness="0,0,0,1"
|
|
||||||
PointerPressed="TitleBar_PointerPressed">
|
|
||||||
<Grid ColumnDefinitions="*,Auto" Margin="14,0">
|
|
||||||
<TextBlock Text="UNFINISHED PLANNING SESSION"
|
|
||||||
FontFamily="{DynamicResource MonoFont}"
|
|
||||||
FontSize="11"
|
|
||||||
LetterSpacing="1.4"
|
|
||||||
Foreground="{DynamicResource TextBrush}"
|
|
||||||
VerticalAlignment="Center"/>
|
|
||||||
<Button Grid.Column="1"
|
|
||||||
Classes="icon-btn"
|
|
||||||
Content="✕"
|
|
||||||
FontSize="12"
|
|
||||||
Command="{Binding CancelCommand}"
|
|
||||||
VerticalAlignment="Center"/>
|
|
||||||
</Grid>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!-- Body -->
|
|
||||||
<StackPanel Grid.Row="1" Margin="20,16" Spacing="8">
|
|
||||||
<TextBlock Text="{Binding TaskTitle}"
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
Foreground="{DynamicResource TextBrush}"
|
|
||||||
TextTrimming="CharacterEllipsis"/>
|
|
||||||
<TextBlock Foreground="{DynamicResource TextDimBrush}">
|
|
||||||
<Run Text="{Binding DraftCount}"/>
|
|
||||||
<Run Text=" draft task(s) waiting to be finalized."/>
|
|
||||||
</TextBlock>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</ctl:ModalShell.Footer>
|
||||||
|
|
||||||
<!-- Footer -->
|
<!-- Body -->
|
||||||
<Border Grid.Row="2"
|
<StackPanel Margin="20,16" Spacing="8">
|
||||||
Background="{DynamicResource DeepBrush}"
|
<TextBlock Text="{Binding TaskTitle}"
|
||||||
BorderBrush="{DynamicResource LineBrush}"
|
FontWeight="SemiBold"
|
||||||
BorderThickness="0,1,0,0">
|
Foreground="{DynamicResource TextBrush}"
|
||||||
<StackPanel Orientation="Horizontal" Spacing="8"
|
TextTrimming="CharacterEllipsis"/>
|
||||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
<TextBlock Foreground="{DynamicResource TextDimBrush}">
|
||||||
Margin="16,0">
|
<Run Text="{Binding DraftCount}"/>
|
||||||
<Button Content="Discard" Command="{Binding DiscardCommand}" MinWidth="80"/>
|
<Run Text=" draft task(s) waiting to be finalized."/>
|
||||||
<Button Content="Finalize" Command="{Binding FinalizeNowCommand}" MinWidth="80"/>
|
</TextBlock>
|
||||||
<Button Content="Resume" Command="{Binding ResumeCommand}" Classes="primary" MinWidth="80"/>
|
</StackPanel>
|
||||||
</StackPanel>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
</Grid>
|
</ctl:ModalShell>
|
||||||
</Border>
|
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Input;
|
|
||||||
|
|
||||||
namespace ClaudeDo.Ui.Views.Modals;
|
namespace ClaudeDo.Ui.Views.Modals;
|
||||||
|
|
||||||
@@ -14,10 +13,4 @@ public partial class UnfinishedPlanningModalView : Window
|
|||||||
vm.CloseAction = () => Close();
|
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