ux: use trimmed error message

This commit is contained in:
leo 2024-12-19 17:38:37 +08:00
parent 7acd6e42fe
commit 7ee7964799
No known key found for this signature in database
2 changed files with 5 additions and 7 deletions

View file

@ -120,8 +120,8 @@ namespace SourceGit.Commands
{
if (RaiseError)
{
var errMsg = string.Join("\n", errs);
if (!string.IsNullOrWhiteSpace(errMsg))
var errMsg = string.Join("\n", errs).Trim();
if (!string.IsNullOrEmpty(errMsg))
Dispatcher.UIThread.Post(() => App.RaiseException(Context, errMsg));
}

View file

@ -125,11 +125,9 @@
</Button>
</Grid>
<Border Grid.Row="1" Margin="8" Background="Transparent">
<ScrollViewer MaxHeight="200" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<TextBlock Margin="4,2" TextWrapping="Wrap" Text="{Binding Message}"/>
</ScrollViewer>
</Border>
<ScrollViewer Grid.Row="1" Margin="8" MaxHeight="200" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<TextBlock Margin="4,2" TextWrapping="Wrap" Text="{Binding Message}"/>
</ScrollViewer>
</Grid>
</Border>
</Border>