diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index 2e8b5448..76beb4f9 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -431,7 +431,6 @@
Configure this repository
CONTINUE
Open In File Browser
- Filter Branches
FILTERED BY:
LOCAL BRANCHES
Navigate To HEAD
@@ -446,6 +445,7 @@
Search By
Information
File
+ Search Branches & Tags
Statistics
SUBMODULES
ADD SUBMODULE
diff --git a/src/Resources/Locales/zh_CN.axaml b/src/Resources/Locales/zh_CN.axaml
index 4121eaae..12158d43 100644
--- a/src/Resources/Locales/zh_CN.axaml
+++ b/src/Resources/Locales/zh_CN.axaml
@@ -433,7 +433,6 @@
配置本仓库
下一步
在文件浏览器中打开
- 过滤显示分支
过滤规则 :
本地分支
定位HEAD
@@ -448,6 +447,7 @@
搜索途径
摘要
文件
+ 快速查找分支、标签
提交统计
子模块列表
添加子模块
diff --git a/src/Resources/Locales/zh_TW.axaml b/src/Resources/Locales/zh_TW.axaml
index 33d2a48b..8b55fcfc 100644
--- a/src/Resources/Locales/zh_TW.axaml
+++ b/src/Resources/Locales/zh_TW.axaml
@@ -433,7 +433,6 @@
配置本倉庫
下一步
在檔案瀏覽器中開啟
- 過濾顯示分支
過濾規則 :
本地分支
定位HEAD
@@ -448,6 +447,7 @@
查詢方式
摘要
檔案
+ 快速查找分支、標籤
提交統計
子模組列表
新增子模組
diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs
index 99bff966..cc44231c 100644
--- a/src/ViewModels/Repository.cs
+++ b/src/ViewModels/Repository.cs
@@ -99,6 +99,7 @@ namespace SourceGit.ViewModels
var builder = BuildBranchTree(_branches, _remotes);
LocalBranchTrees = builder.Locals;
RemoteBranchTrees = builder.Remotes;
+ VisibleTags = BuildVisibleTags();
}
}
}
@@ -145,6 +146,13 @@ namespace SourceGit.ViewModels
private set => SetProperty(ref _tags, value);
}
+ [JsonIgnore]
+ public List VisibleTags
+ {
+ get => _visibleTags;
+ private set => SetProperty(ref _visibleTags, value);
+ }
+
[JsonIgnore]
public List Submodules
{
@@ -295,6 +303,7 @@ namespace SourceGit.ViewModels
_localBranchTrees.Clear();
_remoteBranchTrees.Clear();
_tags.Clear();
+ _visibleTags.Clear();
_submodules.Clear();
_searchedCommits.Clear();
}
@@ -633,6 +642,7 @@ namespace SourceGit.ViewModels
Dispatcher.UIThread.Invoke(() =>
{
Tags = tags;
+ VisibleTags = BuildVisibleTags();
});
}
@@ -1827,6 +1837,25 @@ namespace SourceGit.ViewModels
return builder;
}
+ private List BuildVisibleTags()
+ {
+ var visible = new List();
+ if (string.IsNullOrEmpty(_searchBranchFilter))
+ {
+ visible.AddRange(_tags);
+ }
+ else
+ {
+ foreach (var t in _tags)
+ {
+ if (t.Name.Contains(_searchBranchFilter, StringComparison.OrdinalIgnoreCase))
+ visible.Add(t);
+ }
+ }
+
+ return visible;
+ }
+
private string _fullpath = string.Empty;
private string _gitDir = string.Empty;
@@ -1854,6 +1883,7 @@ namespace SourceGit.ViewModels
private List _remoteBranchTrees = new List();
private List _worktrees = new List();
private List _tags = new List();
+ private List _visibleTags = new List();
private List _submodules = new List();
private bool _includeUntracked = true;
diff --git a/src/Views/Repository.axaml b/src/Views/Repository.axaml
index 722e3ffc..4c84b95a 100644
--- a/src/Views/Repository.axaml
+++ b/src/Views/Repository.axaml
@@ -206,7 +206,7 @@
BorderThickness="1"
CornerRadius="4"
BorderBrush="{DynamicResource Brush.Border2}"
- Watermark="{DynamicResource Text.Repository.FilterBranchTip}"
+ Watermark="{DynamicResource Text.Repository.SearchBranchTag}"
Text="{Binding SearchBranchFilter, Mode=TwoWay}"
VerticalContentAlignment="Center">
@@ -375,10 +375,9 @@
+ ContextRequested="OnTagContextRequested"
+ PropertyChanged="OnTagPropertyChanged">