Skip to content

Commit 39800e0

Browse files
authored
Merge branch 'develop' into nav
2 parents 03b02ea + 4692df9 commit 39800e0

File tree

7 files changed

+57
-20
lines changed

7 files changed

+57
-20
lines changed

TRANSLATION.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -765,14 +765,7 @@ This document shows the translation status of each locale file in the repository
765765

766766
</details>
767767

768-
### ![ru__RU](https://img.shields.io/badge/ru__RU-99.89%25-yellow)
769-
770-
<details>
771-
<summary>Missing keys in ru_RU.axaml</summary>
772-
773-
- Text.Preferences.DiffMerge.DiffArgs
774-
775-
</details>
768+
### ![ru__RU](https://img.shields.io/badge/ru__RU-%E2%88%9A-brightgreen)
776769

777770
### ![ta__IN](https://img.shields.io/badge/ta__IN-74.97%25-red)
778771

src/Models/ExternalTool.cs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,17 +180,24 @@ public void FindJetBrainsFromToolbox(Func<string> platformFinder)
180180
var state = Path.Combine(platformFinder(), "state.json");
181181
if (File.Exists(state))
182182
{
183-
using var stream = File.OpenRead(state);
184-
var stateData = JsonSerializer.Deserialize(stream, JsonCodeGen.Default.JetBrainsState);
185-
foreach (var tool in stateData.Tools)
183+
try
186184
{
187-
if (exclude.Contains(tool.ToolId.ToLowerInvariant()))
188-
continue;
189-
190-
Tools.Add(new ExternalTool(
191-
$"{tool.DisplayName} {tool.DisplayVersion}",
192-
supportedIcons.Contains(tool.ProductCode) ? $"JetBrains/{tool.ProductCode}" : "JetBrains/JB",
193-
Path.Combine(tool.InstallLocation, tool.LaunchCommand)));
185+
using var stream = File.OpenRead(state);
186+
var stateData = JsonSerializer.Deserialize(stream, JsonCodeGen.Default.JetBrainsState);
187+
foreach (var tool in stateData.Tools)
188+
{
189+
if (exclude.Contains(tool.ToolId.ToLowerInvariant()))
190+
continue;
191+
192+
Tools.Add(new ExternalTool(
193+
$"{tool.DisplayName} {tool.DisplayVersion}",
194+
supportedIcons.Contains(tool.ProductCode) ? $"JetBrains/{tool.ProductCode}" : "JetBrains/JB",
195+
Path.Combine(tool.InstallLocation, tool.LaunchCommand)));
196+
}
197+
}
198+
catch
199+
{
200+
// Ignore exceptions.
194201
}
195202
}
196203
}

src/Resources/Locales/ru_RU.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,7 @@
594594
<x:String x:Key="Text.Preferences.Appearance.UseFixedTabWidth" xml:space="preserve">Использовать фиксированную ширину табуляции в строке заголовка.</x:String>
595595
<x:String x:Key="Text.Preferences.Appearance.UseNativeWindowFrame" xml:space="preserve">Использовать системное окно</x:String>
596596
<x:String x:Key="Text.Preferences.DiffMerge" xml:space="preserve">ИНСТРУМЕНТ СРАВНЕНИЙ/СЛИЯНИЯ</x:String>
597+
<x:String x:Key="Text.Preferences.DiffMerge.DiffArgs" xml:space="preserve">Аргументы сравнения</x:String>
597598
<x:String x:Key="Text.Preferences.DiffMerge.DiffArgs.Tip" xml:space="preserve">Доступны переменные: $LOCAL, $REMOTE</x:String>
598599
<x:String x:Key="Text.Preferences.DiffMerge.MergeArgs" xml:space="preserve">Слить аргументы</x:String>
599600
<x:String x:Key="Text.Preferences.DiffMerge.MergeArgs.Tip" xml:space="preserve">Доступны переменные: $BASE, $LOCAL, $REMOTE, $MERGED</x:String>

src/ViewModels/BranchCompare.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ public Models.Commit ToHead
4343
private set => SetProperty(ref _toHead, value);
4444
}
4545

46+
public int TotalChanges
47+
{
48+
get => _totalChanges;
49+
private set => SetProperty(ref _totalChanges, value);
50+
}
51+
4652
public List<Models.Change> VisibleChanges
4753
{
4854
get => _visibleChanges;
@@ -175,6 +181,7 @@ private void Refresh()
175181

176182
Dispatcher.UIThread.Post(() =>
177183
{
184+
TotalChanges = _changes.Count;
178185
VisibleChanges = visible;
179186
IsLoading = false;
180187

@@ -214,6 +221,7 @@ private void RefreshVisible()
214221
private Models.Branch _to = null;
215222
private Models.Commit _baseHead = null;
216223
private Models.Commit _toHead = null;
224+
private int _totalChanges = 0;
217225
private List<Models.Change> _changes = null;
218226
private List<Models.Change> _visibleChanges = null;
219227
private List<Models.Change> _selectedChanges = null;

src/ViewModels/RevisionCompare.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public object EndPoint
2828

2929
public bool CanSaveAsPatch { get; }
3030

31+
public int TotalChanges
32+
{
33+
get => _totalChanges;
34+
private set => SetProperty(ref _totalChanges, value);
35+
}
36+
3137
public List<Models.Change> VisibleChanges
3238
{
3339
get => _visibleChanges;
@@ -182,6 +188,7 @@ private void Refresh()
182188

183189
Dispatcher.UIThread.Post(() =>
184190
{
191+
TotalChanges = _changes.Count;
185192
VisibleChanges = visible;
186193
IsLoading = false;
187194

@@ -202,6 +209,7 @@ private string GetSHA(object obj)
202209
private bool _isLoading = true;
203210
private object _startPoint = null;
204211
private object _endPoint = null;
212+
private int _totalChanges = 0;
205213
private List<Models.Change> _changes = null;
206214
private List<Models.Change> _visibleChanges = null;
207215
private List<Models.Change> _selectedChanges = null;

src/Views/BranchCompare.axaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
<ColumnDefinition Width="*"/>
9494
</Grid.ColumnDefinitions>
9595

96-
<Grid Grid.Column="0" RowDefinitions="26,*">
96+
<Grid Grid.Column="0" RowDefinitions="26,*,26">
9797
<!-- Search & Display Mode -->
9898
<Grid Grid.Row="0" ColumnDefinitions="*,18">
9999
<TextBox Grid.Column="0"
@@ -137,6 +137,16 @@
137137
Width="48" Height="48"
138138
HorizontalAlignment="Center" VerticalAlignment="Center"
139139
IsVisible="{Binding IsLoading}"/>
140+
141+
<!-- Summary -->
142+
<Border Grid.Row="2" BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="1,0,1,1" Background="Transparent">
143+
<TextBlock Margin="4,0,0,0"
144+
Foreground="{DynamicResource Brush.FG2}"
145+
HorizontalAlignment="Left" VerticalAlignment="Center">
146+
<Run Text="{Binding TotalChanges, Mode=OneWay}" FontWeight="Bold"/>
147+
<Run Text="{DynamicResource Text.CommitDetail.Changes.Count}"/>
148+
</TextBlock>
149+
</Border>
140150
</Grid>
141151

142152
<GridSplitter Grid.Column="1"

src/Views/RevisionCompare.axaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<ColumnDefinition Width="*"/>
6666
</Grid.ColumnDefinitions>
6767

68-
<Grid Grid.Column="0" RowDefinitions="26,*">
68+
<Grid Grid.Column="0" RowDefinitions="26,*,26">
6969
<!-- Search & Display Mode -->
7070
<Grid Grid.Row="0" ColumnDefinitions="*,18">
7171
<TextBox Grid.Column="0"
@@ -109,6 +109,16 @@
109109
Width="48" Height="48"
110110
HorizontalAlignment="Center" VerticalAlignment="Center"
111111
IsVisible="{Binding IsLoading}"/>
112+
113+
<!-- Summary -->
114+
<Border Grid.Row="2" BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="1,0,1,1" Background="Transparent">
115+
<TextBlock Margin="4,0,0,0"
116+
Foreground="{DynamicResource Brush.FG2}"
117+
HorizontalAlignment="Left" VerticalAlignment="Center">
118+
<Run Text="{Binding TotalChanges, Mode=OneWay}" FontWeight="Bold"/>
119+
<Run Text="{DynamicResource Text.CommitDetail.Changes.Count}"/>
120+
</TextBlock>
121+
</Border>
112122
</Grid>
113123

114124
<GridSplitter Grid.Column="1"

0 commit comments

Comments
 (0)