mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-22 05:40:43 +08:00
ux: hide the row to deal with uncommitted local changes when there are no local changes
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -9,6 +9,11 @@ namespace SourceGit.ViewModels
|
||||
get => _branch.Name;
|
||||
}
|
||||
|
||||
public bool HasLocalChanges
|
||||
{
|
||||
get => _repo.LocalChangesCount > 0;
|
||||
}
|
||||
|
||||
public Models.DealWithLocalChanges DealWithLocalChanges
|
||||
{
|
||||
get;
|
||||
|
||||
@@ -14,6 +14,11 @@ namespace SourceGit.ViewModels
|
||||
get;
|
||||
}
|
||||
|
||||
public bool HasLocalChanges
|
||||
{
|
||||
get => _repo.LocalChangesCount > 0;
|
||||
}
|
||||
|
||||
public Models.DealWithLocalChanges DealWithLocalChanges
|
||||
{
|
||||
get;
|
||||
|
||||
@@ -9,6 +9,11 @@ namespace SourceGit.ViewModels
|
||||
get;
|
||||
}
|
||||
|
||||
public bool HasLocalChanges
|
||||
{
|
||||
get => _repo.LocalChangesCount > 0;
|
||||
}
|
||||
|
||||
public Models.DealWithLocalChanges DealWithLocalChanges
|
||||
{
|
||||
get;
|
||||
|
||||
@@ -38,6 +38,11 @@ namespace SourceGit.ViewModels
|
||||
set => SetProperty(ref _selectedBranch, value, true);
|
||||
}
|
||||
|
||||
public bool HasLocalChanges
|
||||
{
|
||||
get => _repo.LocalChangesCount > 0;
|
||||
}
|
||||
|
||||
public Models.DealWithLocalChanges DealWithLocalChanges
|
||||
{
|
||||
get;
|
||||
|
||||
@@ -19,12 +19,7 @@
|
||||
Text="{DynamicResource Text.Checkout}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Margin="0,16,0,0" ColumnDefinitions="140,*">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="Auto" MinHeight="32"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Margin="0,16,0,0" RowDefinitions="32,Auto" ColumnDefinitions="140,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,8,0"
|
||||
@@ -36,13 +31,15 @@
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="0"
|
||||
Height="32"
|
||||
VerticalAlignment="Top">
|
||||
VerticalAlignment="Top"
|
||||
IsVisible="{Binding HasLocalChanges, Mode=OneWay}">
|
||||
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Checkout.LocalChanges}"/>
|
||||
</Border>
|
||||
<v:DealWithLocalChangesMethod Grid.Row="1" Grid.Column="1"
|
||||
Method="{Binding DealWithLocalChanges, Mode=TwoWay}"/>
|
||||
Method="{Binding DealWithLocalChanges, Mode=TwoWay}"
|
||||
IsVisible="{Binding HasLocalChanges, Mode=OneWay}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -19,13 +19,7 @@
|
||||
Text="{DynamicResource Text.Checkout.WithFastForward}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Margin="0,16,0,0" ColumnDefinitions="140,*">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="Auto" MinHeight="32"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Margin="0,16,0,0" RowDefinitions="32,32,Auto" ColumnDefinitions="140,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,8,0"
|
||||
@@ -58,13 +52,15 @@
|
||||
|
||||
<Border Grid.Row="2" Grid.Column="0"
|
||||
Height="32"
|
||||
VerticalAlignment="Top">
|
||||
VerticalAlignment="Top"
|
||||
IsVisible="{Binding HasLocalChanges, Mode=OneWay}">
|
||||
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Checkout.LocalChanges}"/>
|
||||
</Border>
|
||||
<v:DealWithLocalChangesMethod Grid.Row="2" Grid.Column="1"
|
||||
Method="{Binding DealWithLocalChanges, Mode=TwoWay}"/>
|
||||
Method="{Binding DealWithLocalChanges, Mode=TwoWay}"
|
||||
IsVisible="{Binding HasLocalChanges, Mode=OneWay}"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -19,12 +19,7 @@
|
||||
Text="{DynamicResource Text.Checkout.Commit}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Margin="0,16,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="Auto" MinHeight="32"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Margin="0,16,0,0" RowDefinitions="32,Auto,Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" MinWidth="140"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
@@ -42,13 +37,15 @@
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="0"
|
||||
Height="32"
|
||||
VerticalAlignment="Top">
|
||||
VerticalAlignment="Top"
|
||||
IsVisible="{Binding HasLocalChanges, Mode=OneWay}">
|
||||
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Checkout.LocalChanges}"/>
|
||||
</Border>
|
||||
<v:DealWithLocalChangesMethod Grid.Row="1" Grid.Column="1"
|
||||
Method="{Binding DealWithLocalChanges, Mode=TwoWay}"/>
|
||||
Method="{Binding DealWithLocalChanges, Mode=TwoWay}"
|
||||
IsVisible="{Binding HasLocalChanges, Mode=OneWay}"/>
|
||||
|
||||
<Grid Grid.Row="2" Grid.Column="1" ColumnDefinitions="Auto,*" Margin="0,6,0,0">
|
||||
<Path Grid.Column="0"
|
||||
|
||||
@@ -19,15 +19,7 @@
|
||||
Text="{DynamicResource Text.Pull.Title}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Margin="0,16,0,0" ColumnDefinitions="140,*">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="Auto" MinHeight="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Margin="0,16,0,0" RowDefinitions="32,32,32,Auto,32" ColumnDefinitions="140,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,8,0"
|
||||
@@ -81,13 +73,15 @@
|
||||
|
||||
<Border Grid.Row="3" Grid.Column="0"
|
||||
Height="32"
|
||||
VerticalAlignment="Top">
|
||||
VerticalAlignment="Top"
|
||||
IsVisible="{Binding HasLocalChanges, Mode=OneWay}">
|
||||
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Margin="0,0,8,0"
|
||||
Text="{DynamicResource Text.Pull.LocalChanges}"/>
|
||||
</Border>
|
||||
<v:DealWithLocalChangesMethod Grid.Row="3" Grid.Column="1"
|
||||
Method="{Binding DealWithLocalChanges, Mode=TwoWay}"/>
|
||||
Method="{Binding DealWithLocalChanges, Mode=TwoWay}"
|
||||
IsVisible="{Binding HasLocalChanges, Mode=OneWay}"/>
|
||||
|
||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
Content="{DynamicResource Text.Pull.UseRebase}"
|
||||
|
||||
Reference in New Issue
Block a user