mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-20 18:05:00 +00:00
Add preference toggle icon, to diff contents of LFS files
Doesn't have any functionallity yet though
This commit is contained in:
parent
06a77502bc
commit
05e2936abf
4 changed files with 37 additions and 0 deletions
|
@ -264,6 +264,7 @@
|
|||
<x:String x:Key="Text.Diff.IgnoreWhitespace" xml:space="preserve">Ignore All Whitespace Changes</x:String>
|
||||
<x:String x:Key="Text.Diff.Last" xml:space="preserve">Last Difference</x:String>
|
||||
<x:String x:Key="Text.Diff.LFS" xml:space="preserve">LFS OBJECT CHANGE</x:String>
|
||||
<x:String x:Key="Text.Diff.LFSContent" xml:space="preserve">Show LFS Content</x:String>
|
||||
<x:String x:Key="Text.Diff.Next" xml:space="preserve">Next Difference</x:String>
|
||||
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">NO CHANGES OR ONLY EOL CHANGES</x:String>
|
||||
<x:String x:Key="Text.Diff.Prev" xml:space="preserve">Previous Difference</x:String>
|
||||
|
|
|
@ -31,6 +31,20 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public bool ShowContentInLFSDiff
|
||||
{
|
||||
get => Preferences.Instance.ShowContentInLFSDiff;
|
||||
set
|
||||
{
|
||||
if (value != Preferences.Instance.ShowContentInLFSDiff)
|
||||
{
|
||||
Preferences.Instance.ShowContentInLFSDiff = value;
|
||||
OnPropertyChanged();
|
||||
LoadDiffContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string FileModeChange
|
||||
{
|
||||
get => _fileModeChange;
|
||||
|
@ -42,6 +56,11 @@ namespace SourceGit.ViewModels
|
|||
get => _isTextDiff;
|
||||
private set => SetProperty(ref _isTextDiff, value);
|
||||
}
|
||||
public bool IsLFSDiff
|
||||
{
|
||||
get => _isLFSDiff;
|
||||
private set => SetProperty(ref _isLFSDiff, value);
|
||||
}
|
||||
|
||||
public object Content
|
||||
{
|
||||
|
@ -221,6 +240,7 @@ namespace SourceGit.ViewModels
|
|||
|
||||
FileModeChange = latest.FileModeChange;
|
||||
Content = rs;
|
||||
IsLFSDiff = latest.IsLFS;
|
||||
IsTextDiff = rs is Models.TextDiff;
|
||||
});
|
||||
});
|
||||
|
@ -291,6 +311,7 @@ namespace SourceGit.ViewModels
|
|||
private string _fileModeChange = string.Empty;
|
||||
private int _unifiedLines = 4;
|
||||
private bool _isTextDiff = false;
|
||||
private bool _isLFSDiff = false;
|
||||
private object _content = null;
|
||||
private Info _info = null;
|
||||
}
|
||||
|
|
|
@ -231,6 +231,12 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public bool ShowContentInLFSDiff
|
||||
{
|
||||
get => _showContentInLFSDiff;
|
||||
set => SetProperty(ref _showContentInLFSDiff, value);
|
||||
}
|
||||
|
||||
public bool IgnoreWhitespaceChangesInDiff
|
||||
{
|
||||
get => _ignoreWhitespaceChangesInDiff;
|
||||
|
@ -687,6 +693,7 @@ namespace SourceGit.ViewModels
|
|||
private bool _showHiddenSymbolsInDiffView = false;
|
||||
private bool _useFullTextDiff = false;
|
||||
private bool _useBlockNavigationInDiffView = false;
|
||||
private bool _showContentInLFSDiff = false;
|
||||
|
||||
private Models.ChangeViewMode _unstagedChangeViewMode = Models.ChangeViewMode.List;
|
||||
private Models.ChangeViewMode _stagedChangeViewMode = Models.ChangeViewMode.List;
|
||||
|
|
|
@ -152,6 +152,14 @@
|
|||
<Path Width="12" Height="12" Data="{StaticResource Icons.WordWrap}" Margin="0,2,0,0"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Classes="line_path"
|
||||
Width="28"
|
||||
IsChecked="{Binding ShowContentInLFSDiff, Mode=TwoWay}"
|
||||
IsVisible="{Binding IsLFSDiff}"
|
||||
ToolTip.Tip="{DynamicResource Text.Diff.LFSContent}">
|
||||
<Path Width="14" Height="14" Stretch="Uniform" Data="{StaticResource Icons.LFS}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Classes="line_path"
|
||||
Width="28"
|
||||
IsChecked="{Binding IgnoreWhitespace, Mode=TwoWay}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue