refactor: rewrite the way to deal with uncommitted local changes when checkout/pull/create branch (#1085)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-03-13 10:21:54 +08:00
parent e430e847ff
commit 0e261cffd2
No known key found for this signature in database
21 changed files with 63 additions and 260 deletions

View file

@ -22,7 +22,7 @@
<RowDefinition Height="32"/>
<RowDefinition Height="32"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Right" VerticalAlignment="Center"
Margin="0,0,8,0"
@ -84,22 +84,14 @@
Margin="0,0,8,0"
Text="{DynamicResource Text.Pull.LocalChanges}"/>
<WrapPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center">
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.DoNothing}"
x:Name="RadioDoNothing"
<RadioButton GroupName="LocalChanges"
Margin="0,0,8,0"
GroupName="LocalChanges"
IsCheckedChanged="OnLocalChangeActionIsCheckedChanged"/>
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.StashAndReply}"
x:Name="RadioStashAndReply"
Margin="0,0,8,0"
GroupName="LocalChanges"
IsCheckedChanged="OnLocalChangeActionIsCheckedChanged"/>
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.Discard}"
x:Name="RadioDiscard"
GroupName="LocalChanges"
IsCheckedChanged="OnLocalChangeActionIsCheckedChanged"/>
Content="{DynamicResource Text.Pull.LocalChanges.StashAndReply}"
IsChecked="{Binding !DiscardLocalChanges, Mode=TwoWay}"/>
<RadioButton GroupName="LocalChanges"
Content="{DynamicResource Text.Pull.LocalChanges.Discard}"/>
</WrapPanel>
<CheckBox Grid.Row="4" Grid.Column="1"
Content="{DynamicResource Text.Pull.FetchAllBranches}"
IsChecked="{Binding FetchAllBranches, Mode=TwoWay}"/>