mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
Compare commits
18 commits
8de37720fa
...
503f700fc2
Author | SHA1 | Date | |
---|---|---|---|
|
503f700fc2 | ||
|
db66ba82a6 | ||
|
d3e1796492 | ||
|
050b1d1188 | ||
|
0842beb51d | ||
|
774ec65ef6 | ||
|
79c1fb63d0 | ||
|
82320f3494 | ||
|
a969bd9c99 | ||
|
3ee56ddd29 | ||
|
7df6d32ad2 | ||
|
67cf23267a | ||
|
06656f625e | ||
|
bbac6c1478 | ||
|
055835cac2 | ||
|
03f96cc9f8 | ||
|
e2e79fe1b3 | ||
|
8b3212e287 |
19 changed files with 127 additions and 79 deletions
|
@ -47,7 +47,7 @@
|
|||
|
||||
## Translation Status
|
||||
|
||||
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-98.70%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.13%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-86.58%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-100.00%25-brightgreen)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
|
||||
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-98.41%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.57%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-86.31%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-99.57%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-100.00%25-brightgreen)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
|
||||
|
||||
## How to Use
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
### de_DE.axaml: 98.70%
|
||||
### de_DE.axaml: 98.41%
|
||||
|
||||
|
||||
<details>
|
||||
|
@ -12,26 +12,25 @@
|
|||
- Text.Hotkeys.Repo.Push
|
||||
- Text.IssueLinkCM.OpenInBrowser
|
||||
- Text.IssueLinkCM.CopyLink
|
||||
- Text.Preference.Appearance.EditorFontSize
|
||||
- Text.Preference.Appearance.FontSize
|
||||
- Text.Preference.Appearance.FontSize.Default
|
||||
- Text.Preference.Appearance.FontSize.Editor
|
||||
|
||||
</details>
|
||||
|
||||
### es_ES.axaml: 99.13%
|
||||
### es_ES.axaml: 99.57%
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Missing Keys</summary>
|
||||
|
||||
- Text.Diff.SaveAsPatch
|
||||
- Text.Hotkeys.Repo.CreateBranchOnCommit
|
||||
- Text.Hotkeys.Repo.Fetch
|
||||
- Text.Hotkeys.Repo.Pull
|
||||
- Text.Hotkeys.Repo.Push
|
||||
- Text.Preference.Appearance.EditorFontSize
|
||||
- Text.Preference.Appearance.FontSize
|
||||
- Text.Preference.Appearance.FontSize.Default
|
||||
- Text.Preference.Appearance.FontSize.Editor
|
||||
|
||||
</details>
|
||||
|
||||
### fr_FR.axaml: 86.58%
|
||||
### fr_FR.axaml: 86.31%
|
||||
|
||||
|
||||
<details>
|
||||
|
@ -104,7 +103,9 @@
|
|||
- Text.Preference.AI.Model
|
||||
- Text.Preference.AI.Name
|
||||
- Text.Preference.AI.Server
|
||||
- Text.Preference.Appearance.EditorFontSize
|
||||
- Text.Preference.Appearance.FontSize
|
||||
- Text.Preference.Appearance.FontSize.Default
|
||||
- Text.Preference.Appearance.FontSize.Editor
|
||||
- Text.Preference.General.ShowAuthorTime
|
||||
- Text.Preference.Integration
|
||||
- Text.Preference.Shell
|
||||
|
@ -133,13 +134,15 @@
|
|||
|
||||
</details>
|
||||
|
||||
### pt_BR.axaml: 100.00%
|
||||
### pt_BR.axaml: 99.57%
|
||||
|
||||
|
||||
<details>
|
||||
<summary>Missing Keys</summary>
|
||||
|
||||
|
||||
- Text.Preference.Appearance.FontSize
|
||||
- Text.Preference.Appearance.FontSize.Default
|
||||
- Text.Preference.Appearance.FontSize.Editor
|
||||
|
||||
</details>
|
||||
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
8.37
|
||||
8.38
|
|
@ -129,7 +129,7 @@ namespace SourceGit.Commands
|
|||
_oldLine = int.Parse(match.Groups[1].Value);
|
||||
_newLine = int.Parse(match.Groups[2].Value);
|
||||
_result.TextDiff.Lines.Add(new Models.TextDiffLine(Models.TextDiffLineType.Indicator, line, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace SourceGit.Commands
|
|||
{
|
||||
outputHandler?.Invoke(e.Data);
|
||||
builder.AppendLine(e.Data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
try
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<x:String x:Key="Text.Cancel" xml:space="preserve">ABBRECHEN</x:String>
|
||||
<x:String x:Key="Text.ChangeCM.CheckoutThisRevision" xml:space="preserve">Auf diese Revision zurücksetzen</x:String>
|
||||
<x:String x:Key="Text.ChangeCM.CheckoutFirstParentRevision" xml:space="preserve">Auf Vorgänger-Revision zurücksetzen</x:String>
|
||||
<x:String x:Key="Text.ChangeCM.GenerateCommitMessage" xml:space="preserve">Generiere Commit-Nachricht</x:String>
|
||||
<x:String x:Key="Text.ChangeCM.GenerateCommitMessage" xml:space="preserve">Generiere Commit-Nachricht</x:String>
|
||||
<x:String x:Key="Text.ChangeDisplayMode" xml:space="preserve">ANZEIGE MODUS ÄNDERN</x:String>
|
||||
<x:String x:Key="Text.ChangeDisplayMode.Grid" xml:space="preserve">Zeige als Datei- und Ordnerliste</x:String>
|
||||
<x:String x:Key="Text.ChangeDisplayMode.List" xml:space="preserve">Zeige als Pfadliste</x:String>
|
||||
|
@ -429,7 +429,6 @@
|
|||
<x:String x:Key="Text.Preference.AI.Model" xml:space="preserve">Modell</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">DARSTELLUNG</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Standardschriftart</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Standardschriftgröße</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Monospace-Schriftart</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Verwende die Monospace-Schriftart nur im Texteditor</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Design</x:String>
|
||||
|
|
|
@ -434,8 +434,9 @@
|
|||
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Server</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APPEARANCE</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Default Font</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Default Font Size</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">Editor Font Size</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize" xml:space="preserve">Font Size</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize.Default" xml:space="preserve">Default</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize.Editor" xml:space="preserve">Editor</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Monospace Font</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Only use monospace font in text editor</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Theme</x:String>
|
||||
|
|
|
@ -242,6 +242,7 @@
|
|||
<x:String x:Key="Text.Diff.Next" xml:space="preserve">Siguiente Diferencia</x:String>
|
||||
<x:String x:Key="Text.Diff.NoChange" xml:space="preserve">SIN CAMBIOS O SOLO CAMBIOS DE EOL</x:String>
|
||||
<x:String x:Key="Text.Diff.Prev" xml:space="preserve">Diferencia Anterior</x:String>
|
||||
<x:String x:Key="Text.Diff.SaveAsPatch" xml:space="preserve">Guardar como Patch</x:String>
|
||||
<x:String x:Key="Text.Diff.ShowHiddenSymbols" xml:space="preserve">Mostrar símbolos ocultos</x:String>
|
||||
<x:String x:Key="Text.Diff.SideBySide" xml:space="preserve">Diferencia Lado a Lado</x:String>
|
||||
<x:String x:Key="Text.Diff.Submodule" xml:space="preserve">SUBMÓDULO</x:String>
|
||||
|
@ -367,8 +368,12 @@
|
|||
<x:String x:Key="Text.Hotkeys.Repo.Commit" xml:space="preserve">Commit cambios staged</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.CommitAndPush" xml:space="preserve">Commit y push cambios staged</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.CommitWithAutoStage" xml:space="preserve">Stage todos los cambios y commit</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.CreateBranchOnCommit" xml:space="preserve">Crea una nueva rama basada en el commit seleccionado</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.DiscardSelected" xml:space="preserve">Descartar cambios seleccionados</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.Fetch" xml:space="preserve">Fetch, empieza directamente</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.GoHome" xml:space="preserve">Modo Dashboard (Por Defecto)</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.Pull" xml:space="preserve">Pull, empieza directamente</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.Push" xml:space="preserve">Push, empieza directamente</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.Refresh" xml:space="preserve">Forzar a recargar este repositorio</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.StageOrUnstageSelected" xml:space="preserve">Stage/Unstage cambios seleccionados</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Repo.OpenSearchCommits" xml:space="preserve">Modo de búsqueda de commits</x:String>
|
||||
|
@ -433,7 +438,6 @@
|
|||
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Servidor</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APARIENCIA</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Fuente por defecto</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Tamaño de fuente por defecto</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Fuente Monospace</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Usar solo fuente monospace en el editor de texto</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Tema</x:String>
|
||||
|
|
|
@ -371,7 +371,6 @@
|
|||
<x:String x:Key="Text.Preference" xml:space="preserve">Préférences</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APPARENCE</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Police par défaut</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Taille de police par défaut</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Police monospace</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">N'utiliser que des polices monospace pour l'éditeur de texte</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Thème</x:String>
|
||||
|
|
|
@ -460,8 +460,6 @@
|
|||
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Servidor</x:String>
|
||||
<x:String x:Key="Text.Preference.AI" xml:space="preserve">INTELIGÊNCIA ARTIFICIAL</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Fonte Padrão</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Tamanho da fonte padrão</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">Tamanho da fonte do editor</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Fonte Monoespaçada</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Usar fonte monoespaçada apenas no editor de texto</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Tema</x:String>
|
||||
|
|
|
@ -438,8 +438,9 @@
|
|||
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">Сервер</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">ВИД</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Шрифт по-умолчанию</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Размер шрифта по-умолчанию</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">Размер шрифта редактора</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize" xml:space="preserve">Размер шрифта</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize.Default" xml:space="preserve">По-умолчанию</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize.Editor" xml:space="preserve">Редактор</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Моноширный шрифт</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">В текстовом редакторе используется только моноширный шрифт</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Тема</x:String>
|
||||
|
|
|
@ -437,7 +437,9 @@
|
|||
<x:String x:Key="Text.Preference.AI.Server" xml:space="preserve">服务地址</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外观配置</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">缺省字体</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">默认字体大小</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize" xml:space="preserve">字体大小</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize.Default" xml:space="preserve">默认</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize.Editor" xml:space="preserve">代码编辑器</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">代码字体大小</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等宽字体</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">仅在文本编辑器中使用等宽字体</x:String>
|
||||
|
|
|
@ -437,8 +437,9 @@
|
|||
<x:String x:Key="Text.Preference.AI.GenerateSubjectPrompt" xml:space="preserve">產生提交訊息提示詞</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外觀設定</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">預設字型</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">預設字型大小</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">程式碼字型大小</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize" xml:space="preserve">字型大小</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize.Default" xml:space="preserve">預設</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.FontSize.Editor" xml:space="preserve">程式碼</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等寬字型</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">僅在文字編輯器中使用等寬字型</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">佈景主題</x:String>
|
||||
|
|
|
@ -118,7 +118,7 @@ namespace SourceGit.ViewModels
|
|||
var trimmedUrl = url;
|
||||
if (url.EndsWith(".git"))
|
||||
trimmedUrl = url.Substring(0, url.Length - 4);
|
||||
|
||||
|
||||
if (url.StartsWith("https://github.com/", StringComparison.Ordinal))
|
||||
WebLinks.Add(new Models.CommitLink() { Name = $"Github ({trimmedUrl.Substring(19)})", URLPrefix = $"{url}/commit/" });
|
||||
else if (url.StartsWith("https://gitlab.", StringComparison.Ordinal))
|
||||
|
@ -378,6 +378,19 @@ namespace SourceGit.ViewModels
|
|||
ev.Handled = true;
|
||||
};
|
||||
|
||||
var openWith = new MenuItem();
|
||||
openWith.Header = App.Text("OpenWith");
|
||||
openWith.Icon = App.CreateMenuIcon("Icons.OpenWith");
|
||||
openWith.Click += (_, ev) =>
|
||||
{
|
||||
var fileName = Path.GetFileNameWithoutExtension(fullPath) ?? "";
|
||||
var fileExt = Path.GetExtension(fullPath) ?? "";
|
||||
var tmpFile = Path.Combine(Path.GetTempPath(), $"{fileName}~{_commit.SHA.Substring(0, 10)}{fileExt}");
|
||||
Commands.SaveRevisionFile.Run(_repo.FullPath, _commit.SHA, file.Path, tmpFile);
|
||||
Native.OS.OpenWithDefaultEditor(tmpFile);
|
||||
ev.Handled = true;
|
||||
};
|
||||
|
||||
var saveAs = new MenuItem();
|
||||
saveAs.Header = App.Text("SaveAs");
|
||||
saveAs.Icon = App.CreateMenuIcon("Icons.Save");
|
||||
|
@ -407,6 +420,7 @@ namespace SourceGit.ViewModels
|
|||
};
|
||||
|
||||
menu.Items.Add(explore);
|
||||
menu.Items.Add(openWith);
|
||||
menu.Items.Add(saveAs);
|
||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@
|
|||
TextDecorations="Underline"
|
||||
Cursor="Hand"
|
||||
Margin="0,0,16,0"
|
||||
PointerPressed="OnParentSHAPressed"/>
|
||||
PointerPressed="OnSHAPressed"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
@ -135,7 +135,7 @@
|
|||
|
||||
<!-- Messages -->
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Message}" VerticalAlignment="Top" Margin="0,4,0,0" />
|
||||
<v:CommitMessagePresenter Grid.Row="3" Grid.Column="1"
|
||||
<v:CommitMessagePresenter Grid.Row="4" Grid.Column="1"
|
||||
Margin="12,5,8,0"
|
||||
Classes="primary"
|
||||
Message="{Binding #ThisControl.Message}"
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace SourceGit.Views
|
|||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnParentSHAPressed(object sender, PointerPressedEventArgs e)
|
||||
private void OnSHAPressed(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
if (DataContext is ViewModels.CommitDetail detail && sender is Control { DataContext: string sha })
|
||||
{
|
||||
|
|
|
@ -192,35 +192,26 @@ namespace SourceGit.Views
|
|||
if (string.IsNullOrEmpty(subject))
|
||||
return;
|
||||
|
||||
var offset = 0;
|
||||
var keywordMatch = REG_KEYWORD_FORMAT1().Match(subject);
|
||||
if (!keywordMatch.Success)
|
||||
keywordMatch = REG_KEYWORD_FORMAT2().Match(subject);
|
||||
|
||||
if (keywordMatch.Success)
|
||||
{
|
||||
var keyword = new Run(subject.Substring(0, keywordMatch.Length));
|
||||
keyword.FontWeight = FontWeight.Bold;
|
||||
Inlines.Add(keyword);
|
||||
|
||||
offset = keywordMatch.Length;
|
||||
subject = subject.Substring(offset);
|
||||
}
|
||||
|
||||
var rules = IssueTrackerRules;
|
||||
if (rules == null || rules.Count == 0)
|
||||
{
|
||||
Inlines.Add(new Run(subject));
|
||||
return;
|
||||
}
|
||||
|
||||
var rules = IssueTrackerRules ?? [];
|
||||
var matches = new List<Models.Hyperlink>();
|
||||
foreach (var rule in rules)
|
||||
rule.Matches(matches, subject);
|
||||
|
||||
if (matches.Count == 0)
|
||||
{
|
||||
Inlines.Add(new Run(subject));
|
||||
if (keywordMatch.Success)
|
||||
{
|
||||
Inlines.Add(new Run(subject.Substring(0, keywordMatch.Length)) { FontWeight = FontWeight.Bold });
|
||||
Inlines.Add(new Run(subject.Substring(keywordMatch.Length)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Inlines.Add(new Run(subject));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -232,18 +223,44 @@ namespace SourceGit.Views
|
|||
foreach (var match in matches)
|
||||
{
|
||||
if (match.Start > pos)
|
||||
inlines.Add(new Run(subject.Substring(pos, match.Start - pos)));
|
||||
{
|
||||
if (keywordMatch.Success && pos < keywordMatch.Length)
|
||||
{
|
||||
if (keywordMatch.Length < match.Start)
|
||||
{
|
||||
inlines.Add(new Run(subject.Substring(pos, keywordMatch.Length - pos)) { FontWeight = FontWeight.Bold });
|
||||
inlines.Add(new Run(subject.Substring(keywordMatch.Length, match.Start - keywordMatch.Length)));
|
||||
}
|
||||
else
|
||||
{
|
||||
inlines.Add(new Run(subject.Substring(pos, match.Start - pos)) { FontWeight = FontWeight.Bold });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
inlines.Add(new Run(subject.Substring(pos, match.Start - pos)));
|
||||
}
|
||||
}
|
||||
|
||||
var link = new Run(subject.Substring(match.Start, match.Length));
|
||||
link.Classes.Add("issue_link");
|
||||
inlines.Add(link);
|
||||
|
||||
pos = match.Start + match.Length;
|
||||
match.Start += offset; // Because we use this index of whole subject to detect mouse event.
|
||||
}
|
||||
|
||||
if (pos < subject.Length)
|
||||
inlines.Add(new Run(subject.Substring(pos)));
|
||||
{
|
||||
if (keywordMatch.Success && pos < keywordMatch.Length)
|
||||
{
|
||||
inlines.Add(new Run(subject.Substring(pos, keywordMatch.Length - pos)) { FontWeight = FontWeight.Bold });
|
||||
inlines.Add(new Run(subject.Substring(keywordMatch.Length)));
|
||||
}
|
||||
else
|
||||
{
|
||||
inlines.Add(new Run(subject.Substring(pos)));
|
||||
}
|
||||
}
|
||||
|
||||
Inlines.AddRange(inlines);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<TabItem.Header>
|
||||
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Appearance}"/>
|
||||
</TabItem.Header>
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.Appearance.Theme}"
|
||||
HorizontalAlignment="Right"
|
||||
|
@ -158,34 +158,43 @@
|
|||
Text="{Binding MonospaceFontFamily, Mode=TwoWay}"/>
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.Appearance.DefaultFontSize}"
|
||||
Text="{DynamicResource Text.Preference.Appearance.FontSize}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"/>
|
||||
<NumericUpDown Grid.Row="3" Grid.Column="1"
|
||||
<Grid Grid.Row="3" Grid.Column="1" ColumnDefinitions="*,8,*">
|
||||
<NumericUpDown Grid.Column="0"
|
||||
Minimum="10" Maximum="18" Increment="0.5"
|
||||
Height="28"
|
||||
Padding="4"
|
||||
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
|
||||
CornerRadius="3"
|
||||
Value="{Binding DefaultFontSize, Mode=TwoWay}"/>
|
||||
Value="{Binding DefaultFontSize, Mode=TwoWay}">
|
||||
<NumericUpDown.InnerLeftContent>
|
||||
<Border BorderThickness="0,0,1,0" BorderBrush="{DynamicResource Brush.Border1}">
|
||||
<TextBlock Margin="4,0" Text="{DynamicResource Text.Preference.Appearance.FontSize.Default}"/>
|
||||
</Border>
|
||||
</NumericUpDown.InnerLeftContent>
|
||||
</NumericUpDown>
|
||||
<NumericUpDown Grid.Column="2"
|
||||
Minimum="10" Maximum="18" Increment="0.5"
|
||||
Height="28"
|
||||
Padding="4"
|
||||
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
|
||||
CornerRadius="3"
|
||||
Value="{Binding EditorFontSize, Mode=TwoWay}">
|
||||
<NumericUpDown.InnerLeftContent>
|
||||
<Border BorderThickness="0,0,1,0" BorderBrush="{DynamicResource Brush.Border1}">
|
||||
<TextBlock Margin="4,0" Text="{DynamicResource Text.Preference.Appearance.FontSize.Editor}"/>
|
||||
</Border>
|
||||
</NumericUpDown.InnerLeftContent>
|
||||
</NumericUpDown>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Grid.Row="4" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.Appearance.EditorFontSize}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"/>
|
||||
<NumericUpDown Grid.Row="4" Grid.Column="1"
|
||||
Minimum="10" Maximum="18" Increment="0.5"
|
||||
Height="28"
|
||||
Padding="4"
|
||||
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
|
||||
CornerRadius="3"
|
||||
Value="{Binding EditorFontSize, Mode=TwoWay}"/>
|
||||
|
||||
<TextBlock Grid.Row="5" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.Appearance.ThemeOverrides}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"/>
|
||||
<TextBox Grid.Row="5" Grid.Column="1"
|
||||
<TextBox Grid.Row="4" Grid.Column="1"
|
||||
Height="28"
|
||||
CornerRadius="3"
|
||||
Text="{Binding ThemeOverrides, Mode=TwoWay}">
|
||||
|
@ -196,16 +205,16 @@
|
|||
</TextBox.InnerRightContent>
|
||||
</TextBox>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
Content="{DynamicResource Text.Preference.Appearance.OnlyUseMonoFontInEditor}"
|
||||
IsChecked="{Binding OnlyUseMonoFontInEditor, Mode=TwoWay}"/>
|
||||
|
||||
<CheckBox Grid.Row="7" Grid.Column="1"
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.Appearance.UseFixedTabWidth}"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth, Mode=TwoWay}"/>
|
||||
|
||||
<CheckBox Grid.Row="8" Grid.Column="1"
|
||||
<CheckBox Grid.Row="7" Grid.Column="1"
|
||||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.Appearance.UseNativeWindowFrame}"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSystemWindowFrame, Mode=OneTime}"
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace SourceGit.Views
|
|||
var startDirectly = launcher.HasKeyModifier(KeyModifiers.Control);
|
||||
if (!startDirectly && OperatingSystem.IsMacOS())
|
||||
startDirectly = launcher.HasKeyModifier(KeyModifiers.Meta);
|
||||
|
||||
|
||||
repo.Fetch(startDirectly);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ namespace SourceGit.Views
|
|||
var startDirectly = launcher.HasKeyModifier(KeyModifiers.Control);
|
||||
if (!startDirectly && OperatingSystem.IsMacOS())
|
||||
startDirectly = launcher.HasKeyModifier(KeyModifiers.Meta);
|
||||
|
||||
|
||||
repo.Pull(startDirectly);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ namespace SourceGit.Views
|
|||
var startDirectly = launcher.HasKeyModifier(KeyModifiers.Control);
|
||||
if (!startDirectly && OperatingSystem.IsMacOS())
|
||||
startDirectly = launcher.HasKeyModifier(KeyModifiers.Meta);
|
||||
|
||||
|
||||
repo.Push(startDirectly);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue