mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-11 23:57:21 -08:00
code_style: run dotnet format
Some checks are pending
Some checks are pending
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
28c93da73b
commit
a824adf6d3
6 changed files with 9 additions and 10 deletions
|
@ -6,7 +6,7 @@ namespace SourceGit.Converters
|
||||||
public static class FilterModeConverters
|
public static class FilterModeConverters
|
||||||
{
|
{
|
||||||
public static readonly FuncValueConverter<Models.FilterMode, IBrush> ToBorderBrush =
|
public static readonly FuncValueConverter<Models.FilterMode, IBrush> ToBorderBrush =
|
||||||
new FuncValueConverter<Models.FilterMode, IBrush>(v =>
|
new FuncValueConverter<Models.FilterMode, IBrush>(v =>
|
||||||
{
|
{
|
||||||
switch (v)
|
switch (v)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,19 +20,19 @@ namespace SourceGit.Models
|
||||||
|
|
||||||
public class Filter : ObservableObject
|
public class Filter : ObservableObject
|
||||||
{
|
{
|
||||||
public string Pattern
|
public string Pattern
|
||||||
{
|
{
|
||||||
get => _pattern;
|
get => _pattern;
|
||||||
set => SetProperty(ref _pattern, value);
|
set => SetProperty(ref _pattern, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FilterType Type
|
public FilterType Type
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
set;
|
set;
|
||||||
} = FilterType.LocalBranch;
|
} = FilterType.LocalBranch;
|
||||||
|
|
||||||
public FilterMode Mode
|
public FilterMode Mode
|
||||||
{
|
{
|
||||||
get => _mode;
|
get => _mode;
|
||||||
set => SetProperty(ref _mode, value);
|
set => SetProperty(ref _mode, value);
|
||||||
|
|
|
@ -159,7 +159,7 @@ namespace SourceGit.Models
|
||||||
if (Server.Contains("openai.azure.com/", StringComparison.Ordinal))
|
if (Server.Contains("openai.azure.com/", StringComparison.Ordinal))
|
||||||
client.DefaultRequestHeaders.Add("api-key", ApiKey);
|
client.DefaultRequestHeaders.Add("api-key", ApiKey);
|
||||||
else
|
else
|
||||||
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {ApiKey}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var req = new StringContent(JsonSerializer.Serialize(chat, JsonCodeGen.Default.OpenAIChatRequest), Encoding.UTF8, "application/json");
|
var req = new StringContent(JsonSerializer.Serialize(chat, JsonCodeGen.Default.OpenAIChatRequest), Encoding.UTF8, "application/json");
|
||||||
|
|
|
@ -234,7 +234,7 @@ namespace SourceGit.Models
|
||||||
{
|
{
|
||||||
var name = filter.Pattern.Substring(11);
|
var name = filter.Pattern.Substring(11);
|
||||||
var b = $"{name.Substring(0, name.Length - 1)}[{name[^1]}]";
|
var b = $"{name.Substring(0, name.Length - 1)}[{name[^1]}]";
|
||||||
|
|
||||||
if (filter.Mode == FilterMode.Included)
|
if (filter.Mode == FilterMode.Included)
|
||||||
includedBranches.Add(b);
|
includedBranches.Add(b);
|
||||||
else if (filter.Mode == FilterMode.Excluded)
|
else if (filter.Mode == FilterMode.Excluded)
|
||||||
|
|
|
@ -701,7 +701,7 @@ namespace SourceGit.ViewModels
|
||||||
if (local.FullName.StartsWith(filter.Pattern, StringComparison.Ordinal))
|
if (local.FullName.StartsWith(filter.Pattern, StringComparison.Ordinal))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hasIncludedBranch |= filter.Mode == Models.FilterMode.Included;
|
hasIncludedBranch |= filter.Mode == Models.FilterMode.Included;
|
||||||
}
|
}
|
||||||
else if (filter.Type == Models.FilterType.RemoteBranch || filter.Type == Models.FilterType.RemoteBranchFolder)
|
else if (filter.Type == Models.FilterType.RemoteBranch || filter.Type == Models.FilterType.RemoteBranchFolder)
|
||||||
{
|
{
|
||||||
|
@ -2035,7 +2035,7 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
node.FilterMode = _settings.GetHistoriesFilterMode(node.Path, isLocal ? Models.FilterType.LocalBranchFolder : Models.FilterType.RemoteBranchFolder);
|
node.FilterMode = _settings.GetHistoriesFilterMode(node.Path, isLocal ? Models.FilterType.LocalBranchFolder : Models.FilterType.RemoteBranchFolder);
|
||||||
UpdateBranchTreeFilterMode(node.Children, isLocal);
|
UpdateBranchTreeFilterMode(node.Children, isLocal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
@ -89,7 +88,7 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
menu.Items.Add(unset);
|
menu.Items.Add(unset);
|
||||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||||
}
|
}
|
||||||
|
|
||||||
var include = new MenuItem();
|
var include = new MenuItem();
|
||||||
include.Icon = App.CreateMenuIcon("Icons.Filter");
|
include.Icon = App.CreateMenuIcon("Icons.Filter");
|
||||||
|
|
Loading…
Reference in a new issue