mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
Compare commits
9 commits
7df96377b8
...
9ed5226eab
Author | SHA1 | Date | |
---|---|---|---|
|
9ed5226eab | ||
|
573db575b6 | ||
|
aae5f10f66 | ||
|
7d800dc0bf | ||
|
7779b05680 | ||
|
6abb6c6469 | ||
|
0621ed950e | ||
|
8f9e2cefe9 | ||
|
7f8a1c384a |
12 changed files with 51 additions and 28 deletions
|
@ -318,14 +318,11 @@
|
|||
<x:String x:Key="Text.GitLFS.TrackByExtension" xml:space="preserve">Verfolge alle *{0} Dateien</x:String>
|
||||
<x:String x:Key="Text.Histories" xml:space="preserve">Verlauf</x:String>
|
||||
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Wechsle zwischen horizontalem und vertikalem Layout</x:String>
|
||||
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Wechsle zwischen Kurven- und Konturgraphenmodus</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">AUTOR</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">AUTOR ZEITPUNKT</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">GRAPH & COMMIT-NACHRICHT</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">COMMIT ZEITPUNKT</x:String>
|
||||
<x:String x:Key="Text.Histories.Search" xml:space="preserve">DURCHSUCHE SHA/SUBJEKT/AUTOR. DRÜCKE ZUM SUCHEN ENTER, ESC UM ABZUBRECHEN</x:String>
|
||||
<x:String x:Key="Text.Histories.SearchClear" xml:space="preserve">LÖSCHEN</x:String>
|
||||
<x:String x:Key="Text.Histories.Selected" xml:space="preserve">{0} COMMITS AUSGEWÄHLT</x:String>
|
||||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Tastaturkürzel Referenz</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">GLOBAL</x:String>
|
||||
|
|
|
@ -315,15 +315,15 @@
|
|||
<x:String x:Key="Text.GitLFS.TrackByExtension" xml:space="preserve">Track all *{0} files</x:String>
|
||||
<x:String x:Key="Text.Histories" xml:space="preserve">Histories</x:String>
|
||||
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Switch Horizontal/Vertical Layout</x:String>
|
||||
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Switch Curve/Polyline Graph Mode</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">AUTHOR</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">AUTHOR TIME</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">GRAPH & SUBJECT</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">COMMIT TIME</x:String>
|
||||
<x:String x:Key="Text.Histories.Search" xml:space="preserve">SEARCH SHA/SUBJECT/AUTHOR. PRESS ENTER TO SEARCH, ESC TO QUIT</x:String>
|
||||
<x:String x:Key="Text.Histories.SearchClear" xml:space="preserve">CLEAR</x:String>
|
||||
<x:String x:Key="Text.Histories.Selected" xml:space="preserve">SELECTED {0} COMMITS</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips" xml:space="preserve">Holding 'Ctrl' or 'Shift' to select multiple commits.</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips.MacOS" xml:space="preserve">Holding '⌘' or '⇧' to select multiple commits.</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips.Prefix" xml:space="preserve">TIPS:</x:String>
|
||||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Keyboard Shortcuts Reference</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">GLOBAL</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">Cancel current popup</x:String>
|
||||
|
|
|
@ -302,13 +302,10 @@
|
|||
<x:String x:Key="Text.GitLFS.TrackByExtension" xml:space="preserve">Track all *{0} files</x:String>
|
||||
<x:String x:Key="Text.Histories" xml:space="preserve">Historique</x:String>
|
||||
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Basculer entre dispositions Horizontal/Vertical</x:String>
|
||||
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Basculer en un graph courbe ou polyligne</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">AUTEUR</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">GRAPHE & SUJET</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">HEURE DE COMMIT</x:String>
|
||||
<x:String x:Key="Text.Histories.Search" xml:space="preserve">CHERCHER UN SHA/SUJET/AUTEUR. ENTRÉE POUR CHERCHER, ESC POUR QUITTER</x:String>
|
||||
<x:String x:Key="Text.Histories.SearchClear" xml:space="preserve">EFFACER</x:String>
|
||||
<x:String x:Key="Text.Histories.Selected" xml:space="preserve">{0} COMMITS SÉLECTIONNÉS</x:String>
|
||||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Référence des raccourcis clavier</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">GLOBAL</x:String>
|
||||
|
|
|
@ -297,13 +297,10 @@
|
|||
<x:String x:Key="Text.GitLFS.TrackByExtension" xml:space="preserve">Rastrear todos os arquivos *{0}</x:String>
|
||||
<x:String x:Key="Text.Histories" xml:space="preserve">Históricos</x:String>
|
||||
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Alternar Layout Horizontal/Vertical</x:String>
|
||||
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Alternar Modo de Gráfico Curvo/Polilinha</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">AUTOR</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">GRÁFICO & ASSUNTO</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">HORA DO COMMIT</x:String>
|
||||
<x:String x:Key="Text.Histories.Search" xml:space="preserve">PROCURAR SHA/ASSUNTO/AUTOR. PRESSIONE ENTER PARA PROCURAR, ESC PARA SAIR</x:String>
|
||||
<x:String x:Key="Text.Histories.SearchClear" xml:space="preserve">LIMPAR</x:String>
|
||||
<x:String x:Key="Text.Histories.Selected" xml:space="preserve">SELECIONADO {0} COMMITS</x:String>
|
||||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Referência de Atalhos de Teclado</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">GLOBAL</x:String>
|
||||
|
|
|
@ -315,14 +315,11 @@
|
|||
<x:String x:Key="Text.GitLFS.TrackByExtension" xml:space="preserve">Отслеживать все *{0} файлов</x:String>
|
||||
<x:String x:Key="Text.Histories" xml:space="preserve">Истории</x:String>
|
||||
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">Переключение горизонтального/вертикального расположения</x:String>
|
||||
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">Переключение режима построения кривой/полилинии</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">АВТОР</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">ВРЕМЯ АВТОРА</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">ГРАФ И СУБЪЕКТ</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">SHA</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">ВРЕМЯ ФИКСАЦИИ</x:String>
|
||||
<x:String x:Key="Text.Histories.Search" xml:space="preserve">ПОИСК SHA/СУБЪЕКТ/АВТОР. НАЖМИТЕ ВВОД ДЛЯ ПОИСКА, ESC ДЛЯ ВЫХОДА</x:String>
|
||||
<x:String x:Key="Text.Histories.SearchClear" xml:space="preserve">ОЧИСТИТЬ</x:String>
|
||||
<x:String x:Key="Text.Histories.Selected" xml:space="preserve">ВЫБРАННЫЕ {0} ФИКСАЦИИ</x:String>
|
||||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">Ссылка на сочетания клавиш</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">ОБЩЕЕ</x:String>
|
||||
|
|
|
@ -318,15 +318,15 @@
|
|||
<x:String x:Key="Text.GitLFS.TrackByExtension" xml:space="preserve">跟踪所有 *{0} 文件</x:String>
|
||||
<x:String x:Key="Text.Histories" xml:space="preserve">历史记录</x:String>
|
||||
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">切换横向/纵向显示</x:String>
|
||||
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">切换曲线/折线显示</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">作者</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">修改时间</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">路线图与主题</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">提交指纹</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">提交时间</x:String>
|
||||
<x:String x:Key="Text.Histories.Search" xml:space="preserve">查询提交指纹、信息、作者。回车键开始,ESC键取消</x:String>
|
||||
<x:String x:Key="Text.Histories.SearchClear" xml:space="preserve">清空</x:String>
|
||||
<x:String x:Key="Text.Histories.Selected" xml:space="preserve">已选中 {0} 项提交</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips" xml:space="preserve">可以按住 Ctrl 或 Shift 键选择多个提交</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips.MacOS" xml:space="preserve">可以按住 ⌘ 或 ⇧ 键选择多个提交</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips.Prefix" xml:space="preserve">小提示:</x:String>
|
||||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快捷键参考</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全局快捷键</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消弹出面板</x:String>
|
||||
|
|
|
@ -318,15 +318,15 @@
|
|||
<x:String x:Key="Text.GitLFS.TrackByExtension" xml:space="preserve">追蹤所有 *{0} 檔案</x:String>
|
||||
<x:String x:Key="Text.Histories" xml:space="preserve">歷史記錄</x:String>
|
||||
<x:String x:Key="Text.Histories.DisplayMode" xml:space="preserve">切換橫向/縱向顯示</x:String>
|
||||
<x:String x:Key="Text.Histories.GraphMode" xml:space="preserve">切換曲線/折線顯示</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Author" xml:space="preserve">作者</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.AuthorTime" xml:space="preserve">修改時間</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.GraphAndSubject" xml:space="preserve">路線圖與訊息標題</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.SHA" xml:space="preserve">提交編號</x:String>
|
||||
<x:String x:Key="Text.Histories.Header.Time" xml:space="preserve">提交時間</x:String>
|
||||
<x:String x:Key="Text.Histories.Search" xml:space="preserve">搜尋提交編號、訊息、作者。按下 Enter 鍵以搜尋,ESC 鍵取消</x:String>
|
||||
<x:String x:Key="Text.Histories.SearchClear" xml:space="preserve">清空</x:String>
|
||||
<x:String x:Key="Text.Histories.Selected" xml:space="preserve">已選取 {0} 項提交</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips" xml:space="preserve">可以按住Ctrl或Shift鍵選擇多個提交</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips.MacOS" xml:space="preserve">可以按住⌘或⇧鍵選擇多個提交</x:String>
|
||||
<x:String x:Key="Text.Histories.Tips.Prefix" xml:space="preserve">小提示:</x:String>
|
||||
<x:String x:Key="Text.Hotkeys" xml:space="preserve">快速鍵參考</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global" xml:space="preserve">全域快速鍵</x:String>
|
||||
<x:String x:Key="Text.Hotkeys.Global.CancelPopup" xml:space="preserve">取消彈出面板</x:String>
|
||||
|
|
|
@ -103,6 +103,9 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (useGraphColor)
|
||||
{
|
||||
if (bg != null)
|
||||
context.DrawRectangle(bg, null, entireRect);
|
||||
|
||||
using (context.PushOpacity(.6))
|
||||
context.DrawRectangle(item.Brush, null, entireRect);
|
||||
}
|
||||
|
|
|
@ -222,10 +222,19 @@
|
|||
<ContentControl.Content>
|
||||
<Binding Path="DetailContext">
|
||||
<Binding.TargetNullValue>
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
<Grid>
|
||||
<Path Width="128" Height="128"
|
||||
Data="{StaticResource Icons.Detail}"
|
||||
HorizontalAlignment="Center"
|
||||
Fill="{DynamicResource Brush.FG2}"/>
|
||||
|
||||
<StackPanel Margin="0,8" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom">
|
||||
<Path Width="12" Height="12" VerticalAlignment="Center" Data="{StaticResource Icons.Info}" Fill="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Margin="4,0" Text="{DynamicResource Text.Histories.Tips.Prefix}" FontWeight="Bold" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Text="{DynamicResource Text.Histories.Tips}" Foreground="{DynamicResource Brush.FG2}" IsVisible="{OnPlatform True, macOS=False}"/>
|
||||
<TextBlock Text="{DynamicResource Text.Histories.Tips.MacOS}" Foreground="{DynamicResource Brush.FG2}" IsVisible="{OnPlatform False, macOS=True}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Binding.TargetNullValue>
|
||||
</Binding>
|
||||
</ContentControl.Content>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using Avalonia;
|
||||
using Avalonia.Collections;
|
||||
|
@ -155,7 +156,7 @@ namespace SourceGit.Views
|
|||
private Status _status = Status.Normal;
|
||||
}
|
||||
|
||||
public class CommitSubjectPresenter : TextBlock
|
||||
public partial class CommitSubjectPresenter : TextBlock
|
||||
{
|
||||
public static readonly StyledProperty<string> SubjectProperty =
|
||||
AvaloniaProperty.Register<CommitSubjectPresenter, string>(nameof(Subject));
|
||||
|
@ -191,6 +192,21 @@ 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)
|
||||
{
|
||||
|
@ -223,6 +239,7 @@ namespace SourceGit.Views
|
|||
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)
|
||||
|
@ -288,6 +305,12 @@ namespace SourceGit.Views
|
|||
}
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"^\[[\w\s]+\]")]
|
||||
private static partial Regex REG_KEYWORD_FORMAT1();
|
||||
|
||||
[GeneratedRegex(@"^\w+([\<\(][\w\s_\-\*,]+[\>\)])?\s?:\s")]
|
||||
private static partial Regex REG_KEYWORD_FORMAT2();
|
||||
|
||||
private List<Models.Hyperlink> _matches = null;
|
||||
private Models.Hyperlink _lastHover = null;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
</Grid>
|
||||
|
||||
<!-- Notification -->
|
||||
<Grid Grid.Row="1" Width="360" HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||
<Grid Grid.Row="1" Width="480" HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl ItemsSource="{Binding Notifications}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
x:DataType="vm:Repository">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{Binding Source={x:Static vm:Preference.Instance}, Path=Layout.RepositorySidebarWidth, Mode=TwoWay}" MinWidth="200" MaxWidth="400"/>
|
||||
<ColumnDefinition Width="{Binding Source={x:Static vm:Preference.Instance}, Path=Layout.RepositorySidebarWidth, Mode=TwoWay}" MinWidth="200" MaxWidth="500"/>
|
||||
<ColumnDefinition Width="3"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
|
Loading…
Reference in a new issue