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 readonly FuncValueConverter<Models.FilterMode, IBrush> ToBorderBrush =
|
||||
new FuncValueConverter<Models.FilterMode, IBrush>(v =>
|
||||
new FuncValueConverter<Models.FilterMode, IBrush>(v =>
|
||||
{
|
||||
switch (v)
|
||||
{
|
||||
|
|
|
@ -20,19 +20,19 @@ namespace SourceGit.Models
|
|||
|
||||
public class Filter : ObservableObject
|
||||
{
|
||||
public string Pattern
|
||||
public string Pattern
|
||||
{
|
||||
get => _pattern;
|
||||
set => SetProperty(ref _pattern, value);
|
||||
}
|
||||
|
||||
public FilterType Type
|
||||
public FilterType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = FilterType.LocalBranch;
|
||||
|
||||
public FilterMode Mode
|
||||
public FilterMode Mode
|
||||
{
|
||||
get => _mode;
|
||||
set => SetProperty(ref _mode, value);
|
||||
|
|
|
@ -159,7 +159,7 @@ namespace SourceGit.Models
|
|||
if (Server.Contains("openai.azure.com/", StringComparison.Ordinal))
|
||||
client.DefaultRequestHeaders.Add("api-key", ApiKey);
|
||||
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");
|
||||
|
|
|
@ -234,7 +234,7 @@ namespace SourceGit.Models
|
|||
{
|
||||
var name = filter.Pattern.Substring(11);
|
||||
var b = $"{name.Substring(0, name.Length - 1)}[{name[^1]}]";
|
||||
|
||||
|
||||
if (filter.Mode == FilterMode.Included)
|
||||
includedBranches.Add(b);
|
||||
else if (filter.Mode == FilterMode.Excluded)
|
||||
|
|
|
@ -701,7 +701,7 @@ namespace SourceGit.ViewModels
|
|||
if (local.FullName.StartsWith(filter.Pattern, StringComparison.Ordinal))
|
||||
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)
|
||||
{
|
||||
|
@ -2035,7 +2035,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
node.FilterMode = _settings.GetHistoriesFilterMode(node.Path, isLocal ? Models.FilterType.LocalBranchFolder : Models.FilterType.RemoteBranchFolder);
|
||||
UpdateBranchTreeFilterMode(node.Children, isLocal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
|
@ -89,7 +88,7 @@ namespace SourceGit.Views
|
|||
|
||||
menu.Items.Add(unset);
|
||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
}
|
||||
}
|
||||
|
||||
var include = new MenuItem();
|
||||
include.Icon = App.CreateMenuIcon("Icons.Filter");
|
||||
|
|
Loading…
Reference in a new issue