mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
Compare commits
8 commits
0ac1031c4c
...
751991c816
Author | SHA1 | Date | |
---|---|---|---|
|
751991c816 | ||
|
a99bd2e973 | ||
|
26923435e7 | ||
|
02658839c2 | ||
|
6eb226eb44 | ||
|
59f11e9aca | ||
|
c4c7bef93c | ||
|
27afe1871f |
24 changed files with 80 additions and 53 deletions
|
@ -74,7 +74,11 @@ namespace SourceGit.Commands
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(e.Data))
|
if (string.IsNullOrEmpty(e.Data))
|
||||||
|
{
|
||||||
|
errs.Add(string.Empty);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (TraitErrorAsOutput)
|
if (TraitErrorAsOutput)
|
||||||
OnReadline(e.Data);
|
OnReadline(e.Data);
|
||||||
|
|
||||||
|
@ -89,6 +93,7 @@ namespace SourceGit.Commands
|
||||||
return;
|
return;
|
||||||
if (REG_PROGRESS().IsMatch(e.Data))
|
if (REG_PROGRESS().IsMatch(e.Data))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
errs.Add(e.Data);
|
errs.Add(e.Data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -99,12 +104,8 @@ namespace SourceGit.Commands
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
if (RaiseError)
|
if (RaiseError)
|
||||||
{
|
Dispatcher.UIThread.Post(() => App.RaiseException(Context, e.Message));
|
||||||
Dispatcher.UIThread.Invoke(() =>
|
|
||||||
{
|
|
||||||
App.RaiseException(Context, e.Message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,15 +116,15 @@ namespace SourceGit.Commands
|
||||||
int exitCode = proc.ExitCode;
|
int exitCode = proc.ExitCode;
|
||||||
proc.Close();
|
proc.Close();
|
||||||
|
|
||||||
if (!isCancelled && exitCode != 0 && errs.Count > 0)
|
if (!isCancelled && exitCode != 0)
|
||||||
{
|
{
|
||||||
if (RaiseError)
|
if (RaiseError)
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Invoke(() =>
|
var errMsg = string.Join("\n", errs);
|
||||||
{
|
if (!string.IsNullOrWhiteSpace(errMsg))
|
||||||
App.RaiseException(Context, string.Join("\n", errs));
|
Dispatcher.UIThread.Post(() => App.RaiseException(Context, errMsg));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,16 +52,28 @@ namespace SourceGit.Commands
|
||||||
_current.Commit.CommitterTime = ulong.Parse(line);
|
_current.Commit.CommitterTime = ulong.Parse(line);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (line.Equals(_boundary, StringComparison.Ordinal))
|
var boundary = rs.StdOut.IndexOf(_boundary, end + 1);
|
||||||
nextPartIdx = -1;
|
if (boundary > end)
|
||||||
|
{
|
||||||
|
_current.Message = rs.StdOut.Substring(start, boundary - start - 1);
|
||||||
|
end = boundary + _boundary.Length;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
_current.Message += line;
|
{
|
||||||
|
_current.Message = rs.StdOut.Substring(start);
|
||||||
|
end = rs.StdOut.Length - 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
nextPartIdx = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
nextPartIdx++;
|
nextPartIdx++;
|
||||||
|
|
||||||
start = end + 1;
|
start = end + 1;
|
||||||
|
if (start >= rs.StdOut.Length - 1)
|
||||||
|
break;
|
||||||
|
|
||||||
end = rs.StdOut.IndexOf('\n', start);
|
end = rs.StdOut.IndexOf('\n', start);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<StreamGeometry x:Key="Icons.Code">M853 102H171C133 102 102 133 102 171v683C102 891 133 922 171 922h683C891 922 922 891 922 853V171C922 133 891 102 853 102zM390 600l-48 48L205 512l137-137 48 48L301 512l88 88zM465 819l-66-18L559 205l66 18L465 819zm218-171L634 600 723 512l-88-88 48-48L819 512 683 649z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.Code">M853 102H171C133 102 102 133 102 171v683C102 891 133 922 171 922h683C891 922 922 891 922 853V171C922 133 891 102 853 102zM390 600l-48 48L205 512l137-137 48 48L301 512l88 88zM465 819l-66-18L559 205l66 18L465 819zm218-171L634 600 723 512l-88-88 48-48L819 512 683 649z</StreamGeometry>
|
||||||
<StreamGeometry x:Key="Icons.CodeBlock">M684 736 340 736l0-53 344 1-0 53zM552 565l-213-2 0-53 212 2-0 53zM684 392 340 392l0-53 344 1-0 53zM301 825c-45 0-78-9-100-27-22-18-33-43-33-75v-116c0-22-4-37-12-45-7-9-20-13-40-13v-61c19 0 32-4 40-12 8-9 12-24 12-46v-116c0-32 11-57 33-75 22-18 56-27 100-27h24v61h-24a35 35 0 00-27 12 41 41 0 00-11 29v116c0 35-10 60-31 75a66 66 0 01-31 14c11 2 22 6 31 14 20 17 31 42 31 75v116c0 12 4 22 11 29 7 8 16 12 27 12h24v61h-24zM701 764h24c10 0 19-4 27-12a41 41 0 0011-29v-116c0-33 10-58 31-75 9-7 19-12 31-14a66 66 0 01-31-14c-20-15-31-40-31-75v-116a41 41 0 00-11-29 35 35 0 00-27-12h-24v-61h24c45 0 78 9 100 27 22 18 33 43 33 75v116c0 22 4 37 11 46 8 8 21 12 40 12v61c-19 0-33 4-40 13-7 8-11 23-11 45v116c0 32-11 57-33 75-22 18-55 27-100 27h-24v-61z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.CodeBlock">M684 736 340 736l0-53 344 1-0 53zM552 565l-213-2 0-53 212 2-0 53zM684 392 340 392l0-53 344 1-0 53zM301 825c-45 0-78-9-100-27-22-18-33-43-33-75v-116c0-22-4-37-12-45-7-9-20-13-40-13v-61c19 0 32-4 40-12 8-9 12-24 12-46v-116c0-32 11-57 33-75 22-18 56-27 100-27h24v61h-24a35 35 0 00-27 12 41 41 0 00-11 29v116c0 35-10 60-31 75a66 66 0 01-31 14c11 2 22 6 31 14 20 17 31 42 31 75v116c0 12 4 22 11 29 7 8 16 12 27 12h24v61h-24zM701 764h24c10 0 19-4 27-12a41 41 0 0011-29v-116c0-33 10-58 31-75 9-7 19-12 31-14a66 66 0 01-31-14c-20-15-31-40-31-75v-116a41 41 0 00-11-29 35 35 0 00-27-12h-24v-61h24c45 0 78 9 100 27 22 18 33 43 33 75v116c0 22 4 37 11 46 8 8 21 12 40 12v61c-19 0-33 4-40 13-7 8-11 23-11 45v116c0 32-11 57-33 75-22 18-55 27-100 27h-24v-61z</StreamGeometry>
|
||||||
<StreamGeometry x:Key="Icons.ColorPicker">M128 854h768v86H128zM390 797c13 13 29 19 48 19s35-6 45-19l291-288c26-22 26-64 0-90L435 83l-61 61L426 192l-272 269c-22 22-22 64 0 90l237 246zm93-544 211 211-32 32H240l243-243zM707 694c0 48 38 86 86 86 48 0 86-38 86-86 0-22-10-45-26-61L794 576l-61 61c-13 13-26 35-26 58z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.ColorPicker">M128 854h768v86H128zM390 797c13 13 29 19 48 19s35-6 45-19l291-288c26-22 26-64 0-90L435 83l-61 61L426 192l-272 269c-22 22-22 64 0 90l237 246zm93-544 211 211-32 32H240l243-243zM707 694c0 48 38 86 86 86 48 0 86-38 86-86 0-22-10-45-26-61L794 576l-61 61c-13 13-26 35-26 58z</StreamGeometry>
|
||||||
<StreamGeometry x:Key="Icons.Commit">M796 471A292 292 0 00512 256a293 293 0 00-284 215H0v144h228A293 293 0 00512 832a291 291 0 00284-217H1024V471h-228M512 688A146 146 0 01366 544A145 145 0 01512 400c80 0 146 63 146 144A146 146 0 01512 688</StreamGeometry>
|
<StreamGeometry x:Key="Icons.Commit">M0 512M1024 512M512 0M512 1024M796 471A292 292 0 00512 256a293 293 0 00-284 215H0v144h228A293 293 0 00512 832a291 291 0 00284-217H1024V471h-228M512 688A146 146 0 01366 544A145 145 0 01512 400c80 0 146 63 146 144A146 146 0 01512 688</StreamGeometry>
|
||||||
<StreamGeometry x:Key="Icons.CommitMessageGenerator">M796 561a5 5 0 014 7l-39 90a5 5 0 004 7h100a5 5 0 014 8l-178 247a5 5 0 01-9-4l32-148a5 5 0 00-5-6h-89a5 5 0 01-4-7l86-191a5 5 0 014-3h88zM731 122a73 73 0 0173 73v318a54 54 0 00-8-1H731V195H244v634h408l-16 73H244a73 73 0 01-73-73V195a73 73 0 0173-73h488zm-219 366v73h-195v-73h195zm146-146v73H317v-73h341z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.CommitMessageGenerator">M796 561a5 5 0 014 7l-39 90a5 5 0 004 7h100a5 5 0 014 8l-178 247a5 5 0 01-9-4l32-148a5 5 0 00-5-6h-89a5 5 0 01-4-7l86-191a5 5 0 014-3h88zM731 122a73 73 0 0173 73v318a54 54 0 00-8-1H731V195H244v634h408l-16 73H244a73 73 0 01-73-73V195a73 73 0 0173-73h488zm-219 366v73h-195v-73h195zm146-146v73H317v-73h341z</StreamGeometry>
|
||||||
<StreamGeometry x:Key="Icons.Compare">M645 448l64 64 220-221L704 64l-64 64 115 115H128v90h628zM375 576l-64-64-220 224L314 960l64-64-116-115H896v-90H262z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.Compare">M645 448l64 64 220-221L704 64l-64 64 115 115H128v90h628zM375 576l-64-64-220 224L314 960l64-64-116-115H896v-90H262z</StreamGeometry>
|
||||||
<StreamGeometry x:Key="Icons.Conflict">M608 0q48 0 88 23t63 63 23 87v70h55q35 0 67 14t57 38 38 57 14 67V831q0 34-14 66t-38 57-57 38-67 13H426q-34 0-66-13t-57-38-38-57-14-66v-70h-56q-34 0-66-14t-57-38-38-57-13-67V174q0-47 23-87T109 23 196 0h412m175 244H426q-46 0-86 22T278 328t-26 85v348H608q47 0 86-22t63-62 25-85l1-348m-269 318q18 0 31 13t13 31-13 31-31 13-31-13-13-31 13-31 31-13m0-212q13 0 22 9t11 22v125q0 14-9 23t-22 10-23-7-11-22l-1-126q0-13 10-23t23-10z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.Conflict">M608 0q48 0 88 23t63 63 23 87v70h55q35 0 67 14t57 38 38 57 14 67V831q0 34-14 66t-38 57-57 38-67 13H426q-34 0-66-13t-57-38-38-57-14-66v-70h-56q-34 0-66-14t-57-38-38-57-13-67V174q0-47 23-87T109 23 196 0h412m175 244H426q-46 0-86 22T278 328t-26 85v348H608q47 0 86-22t63-62 25-85l1-348m-269 318q18 0 31 13t13 31-13 31-31 13-31-13-13-31 13-31 31-13m0-212q13 0 22 9t11 22v125q0 14-9 23t-22 10-23-7-11-22l-1-126q0-13 10-23t23-10z</StreamGeometry>
|
||||||
|
|
|
@ -119,9 +119,9 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
var defaultCloneDir = Preference.Instance.GitDefaultCloneDir;
|
var defaultCloneDir = Preference.Instance.GitDefaultCloneDir;
|
||||||
if (string.IsNullOrEmpty(defaultCloneDir))
|
if (string.IsNullOrEmpty(defaultCloneDir))
|
||||||
App.RaiseException(PopupHost.Active.GetId(), "The default clone dir haven't been configured!");
|
App.RaiseException(PopupHost.Active.GetId(), "The default clone dir hasn't been configured!");
|
||||||
else if (!Directory.Exists(defaultCloneDir))
|
else if (!Directory.Exists(defaultCloneDir))
|
||||||
App.RaiseException(PopupHost.Active.GetId(), $"The default clone dir '{defaultCloneDir}' is not exists!");
|
App.RaiseException(PopupHost.Active.GetId(), $"The default clone dir '{defaultCloneDir}' does not exist!");
|
||||||
else if (PopupHost.CanCreatePopup())
|
else if (PopupHost.CanCreatePopup())
|
||||||
PopupHost.ShowAndStartPopup(new ScanRepositories(defaultCloneDir));
|
PopupHost.ShowAndStartPopup(new ScanRepositories(defaultCloneDir));
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
Text="{DynamicResource Text.Checkout.Commit.Target}" />
|
Text="{DynamicResource Text.Checkout.Commit.Target}" />
|
||||||
<Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*">
|
<Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}" />
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}" />
|
||||||
<TextBlock Grid.Column="1" Classes="primary" Foreground="DarkOrange" VerticalAlignment="Center" Margin="8,0" Text="{Binding Commit.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" />
|
<TextBlock Grid.Column="1" Classes="primary" Foreground="DarkOrange" VerticalAlignment="Center" Margin="8,0" Text="{Binding Commit.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" />
|
||||||
<TextBlock Grid.Column="2" Text="{Binding Commit.Subject}" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" Text="{Binding Commit.Subject}" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<Grid ColumnDefinitions="14,Auto,*">
|
<Grid ColumnDefinitions="14,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" FontFamily="{DynamicResource Fonts.Monospace}" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="6,0,4,0"/>
|
<TextBlock Grid.Column="1" FontFamily="{DynamicResource Fonts.Monospace}" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="6,0,4,0"/>
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -112,7 +112,8 @@
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
Margin="0,0,16,0"
|
Margin="0,0,16,0"
|
||||||
PointerEntered="OnSHAPointerEntered"
|
PointerEntered="OnSHAPointerEntered"
|
||||||
PointerPressed="OnSHAPressed">
|
PointerPressed="OnSHAPressed"
|
||||||
|
ToolTip.ShowDelay="0">
|
||||||
<TextBlock.DataTemplates>
|
<TextBlock.DataTemplates>
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<StackPanel MinWidth="400" Orientation="Vertical">
|
<StackPanel MinWidth="400" Orientation="Vertical">
|
||||||
|
@ -149,7 +150,8 @@
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
Margin="0,0,16,0"
|
Margin="0,0,16,0"
|
||||||
PointerEntered="OnSHAPointerEntered"
|
PointerEntered="OnSHAPointerEntered"
|
||||||
PointerPressed="OnSHAPressed">
|
PointerPressed="OnSHAPressed"
|
||||||
|
ToolTip.ShowDelay="0">
|
||||||
<TextBlock.DataTemplates>
|
<TextBlock.DataTemplates>
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<StackPanel MinWidth="400" Orientation="Vertical">
|
<StackPanel MinWidth="400" Orientation="Vertical">
|
||||||
|
|
|
@ -130,19 +130,15 @@ namespace SourceGit.Views
|
||||||
{
|
{
|
||||||
var tooltip = ToolTip.GetTip(ctl);
|
var tooltip = ToolTip.GetTip(ctl);
|
||||||
if (tooltip is Models.Commit commit && commit.SHA == sha)
|
if (tooltip is Models.Commit commit && commit.SHA == sha)
|
||||||
{
|
return;
|
||||||
ToolTip.SetIsOpen(ctl, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var c = await Task.Run(() => detail.GetParent(sha));
|
|
||||||
if (c != null && ctl.IsVisible && ctl.DataContext is string newSHA && newSHA == sha)
|
|
||||||
{
|
|
||||||
ToolTip.SetTip(ctl, c);
|
|
||||||
|
|
||||||
if (ctl.IsPointerOver)
|
var c = await Task.Run(() => detail.GetParent(sha));
|
||||||
ToolTip.SetIsOpen(ctl, true);
|
if (c != null && ctl.IsVisible && ctl.DataContext is string newSHA && newSHA == sha)
|
||||||
}
|
{
|
||||||
|
ToolTip.SetTip(ctl, c);
|
||||||
|
|
||||||
|
if (ctl.IsPointerOver)
|
||||||
|
ToolTip.SetIsOpen(ctl, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace SourceGit.Views
|
||||||
if (change.Property == TextProperty && _changingWay == TextChangeWay.None)
|
if (change.Property == TextProperty && _changingWay == TextChangeWay.None)
|
||||||
{
|
{
|
||||||
_changingWay = TextChangeWay.FromSource;
|
_changingWay = TextChangeWay.FromSource;
|
||||||
var normalized = Text.ReplaceLineEndings("\n").Trim();
|
var normalized = Text.ReplaceLineEndings("\n");
|
||||||
var subjectEnd = normalized.IndexOf("\n\n", StringComparison.Ordinal);
|
var subjectEnd = normalized.IndexOf("\n\n", StringComparison.Ordinal);
|
||||||
if (subjectEnd == -1)
|
if (subjectEnd == -1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Current.FriendlyName}" Margin="8,0,0,0"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Current.FriendlyName}" Margin="8,0,0,0"/>
|
||||||
|
|
||||||
<TextBlock Grid.Column="3" Margin="48,0,0,0" Text="{DynamicResource Text.InteractiveRebase.On}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
<TextBlock Grid.Column="3" Margin="48,0,0,0" Text="{DynamicResource Text.InteractiveRebase.On}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
||||||
<Path Grid.Column="4" Width="14" Height="14" Margin="8,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="4" Width="14" Height="14" Margin="8,0,0,0" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="5" Classes="primary" VerticalAlignment="Center" Text="{Binding On.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
<TextBlock Grid.Column="5" Classes="primary" VerticalAlignment="Center" Text="{Binding On.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="6" VerticalAlignment="Center" Text="{Binding On.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="6" VerticalAlignment="Center" Text="{Binding On.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -112,19 +112,24 @@
|
||||||
<Border Margin="6" HorizontalAlignment="Stretch" VerticalAlignment="Top" Effect="drop-shadow(0 0 8 #8F000000)">
|
<Border Margin="6" HorizontalAlignment="Stretch" VerticalAlignment="Top" Effect="drop-shadow(0 0 8 #8F000000)">
|
||||||
<Border Padding="8" CornerRadius="6" Background="{DynamicResource Brush.Popup}">
|
<Border Padding="8" CornerRadius="6" Background="{DynamicResource Brush.Popup}">
|
||||||
<Grid RowDefinitions="26,Auto">
|
<Grid RowDefinitions="26,Auto">
|
||||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Margin="8,0">
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto" Margin="8,0">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red" IsVisible="{Binding IsError}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red" IsVisible="{Binding IsError}"/>
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Info}" Fill="Green" IsVisible="{Binding !IsError}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Info}" Fill="Green" IsVisible="{Binding !IsError}"/>
|
||||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Error}" IsVisible="{Binding IsError}"/>
|
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Error}" IsVisible="{Binding IsError}"/>
|
||||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Info}" IsVisible="{Binding !IsError}"/>
|
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Info}" IsVisible="{Binding !IsError}"/>
|
||||||
<Button Grid.Column="2" Classes="icon_button" Width="16" Height="16" Click="OnDismissNotification">
|
<Button Grid.Column="2" Classes="icon_button" Width="16" Height="16" Click="OnCopyNotification">
|
||||||
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Copy}"/>
|
||||||
|
</Button>
|
||||||
|
<Button Grid.Column="3" Classes="icon_button" Width="16" Height="16" Margin="8,0,0,0" Click="OnDismissNotification">
|
||||||
<Path Width="10" Height="10" Data="{StaticResource Icons.Window.Close}"/>
|
<Path Width="10" Height="10" Data="{StaticResource Icons.Window.Close}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ScrollViewer Grid.Row="1" Margin="8" MaxHeight="100" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
<Border Grid.Row="1" Margin="8" Background="{DynamicResource Brush.Contents}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
|
||||||
<SelectableTextBlock TextWrapping="Wrap" Text="{Binding Message}"/>
|
<ScrollViewer MaxHeight="200" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
|
||||||
</ScrollViewer>
|
<TextBlock Margin="4,2" TextWrapping="NoWrap" Text="{Binding Message}"/>
|
||||||
|
</ScrollViewer>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
|
@ -32,6 +32,14 @@ namespace SourceGit.Views
|
||||||
OnPopupCancel(sender, e);
|
OnPopupCancel(sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnCopyNotification(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (sender is Button { DataContext: Models.Notification notice })
|
||||||
|
App.CopyText(notice.Message);
|
||||||
|
|
||||||
|
e.Handled = true;
|
||||||
|
}
|
||||||
|
|
||||||
private void OnDismissNotification(object sender, RoutedEventArgs e)
|
private void OnDismissNotification(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is Button { DataContext: Models.Notification notice } &&
|
if (sender is Button { DataContext: Models.Notification notice } &&
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
<ContentControl.DataTemplates>
|
<ContentControl.DataTemplates>
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<Grid ColumnDefinitions="14,Auto,*">
|
<Grid ColumnDefinitions="14,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" FontFamily="{DynamicResource Fonts.Monospace}" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="6,0,4,0"/>
|
<TextBlock Grid.Column="1" FontFamily="{DynamicResource Fonts.Monospace}" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="6,0,4,0"/>
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<Grid ColumnDefinitions="Auto,Auto,*">
|
<Grid ColumnDefinitions="Auto,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -270,7 +270,10 @@
|
||||||
|
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate DataType="m:IssueTrackerRule">
|
<DataTemplate DataType="m:IssueTrackerRule">
|
||||||
<TextBlock Text="{Binding Name}" Margin="8,0" TextTrimming="CharacterEllipsis"/>
|
<Grid ColumnDefinitions="Auto,*">
|
||||||
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Issue}"/>
|
||||||
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Margin="8,0" TextTrimming="CharacterEllipsis"/>
|
||||||
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
@ -311,7 +314,7 @@
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Fill="{DynamicResource Brush.FG2}"
|
Fill="{DynamicResource Brush.FG2}"
|
||||||
Data="{StaticResource Icons.Issue}"/>
|
Data="{StaticResource Icons.Empty}"/>
|
||||||
</Binding.TargetNullValue>
|
</Binding.TargetNullValue>
|
||||||
</Binding>
|
</Binding>
|
||||||
</ContentControl.Content>
|
</ContentControl.Content>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
Text="{DynamicResource Text.Reset.MoveTo}"/>
|
Text="{DynamicResource Text.Reset.MoveTo}"/>
|
||||||
<Grid Grid.Row="1" Grid.Column="1" ColumnDefinitions="Auto,Auto,*" Height="20" VerticalAlignment="Center">
|
<Grid Grid.Row="1" Grid.Column="1" ColumnDefinitions="Auto,Auto,*" Height="20" VerticalAlignment="Center">
|
||||||
<Path Grid.Column="0" Margin="0,6,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding To.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding To.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
||||||
<TextBlock Grid.Column="2" Text="{Binding To.Subject}" Margin="8,0,0,0" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" Text="{Binding To.Subject}" Margin="8,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
Text="{DynamicResource Text.Revert.Commit}"/>
|
Text="{DynamicResource Text.Revert.Commit}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*">
|
<Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*">
|
||||||
<Path Grid.Column="0" Width="14" Height="14" Margin="0,8,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding Target.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
<TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding Target.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||||
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Target.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
<TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Target.Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
Text="{DynamicResource Text.Reword}"/>
|
Text="{DynamicResource Text.Reword}"/>
|
||||||
|
|
||||||
<StackPanel Margin="8,16,8,0" Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Margin="8,16,8,0" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Path Margin="0,6,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
<Path Margin="0,0,8,0" Width="14" Height="14" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Commit}"/>
|
||||||
<TextBlock Classes="primary" Text="{Binding Head.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
<TextBlock Classes="primary" Text="{Binding Head.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<TextBlock Grid.Column="0"
|
<TextBlock Grid.Column="0"
|
||||||
Text="{DynamicResource Text.Squash.Into}"/>
|
Text="{DynamicResource Text.Squash.Into}"/>
|
||||||
<Path Grid.Column="1"
|
<Path Grid.Column="1"
|
||||||
Margin="8,6,8,0"
|
Margin="8,0"
|
||||||
Width="14" Height="14"
|
Width="14" Height="14"
|
||||||
Fill="{DynamicResource Brush.FG1}"
|
Fill="{DynamicResource Brush.FG1}"
|
||||||
Data="{StaticResource Icons.Commit}"/>
|
Data="{StaticResource Icons.Commit}"/>
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
|
|
||||||
<DataTemplate DataType="m:Commit">
|
<DataTemplate DataType="m:Commit">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Path Width="12" Height="12" Margin="0,6,0,0" Data="{StaticResource Icons.Commit}"/>
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Commit}"/>
|
||||||
<v:CommitRefsPresenter Margin="8,0,0,0"
|
<v:CommitRefsPresenter Margin="8,0,0,0"
|
||||||
TagBackground="{DynamicResource Brush.DecoratorTag}"
|
TagBackground="{DynamicResource Brush.DecoratorTag}"
|
||||||
Foreground="{DynamicResource Brush.FG1}"
|
Foreground="{DynamicResource Brush.FG1}"
|
||||||
|
|
Loading…
Reference in a new issue