mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3 from pc223/add-task-link
Add task links directly to WindowsSettings.json
This commit is contained in:
commit
cfbb884032
4 changed files with 12311 additions and 1 deletions
|
|
@ -47,6 +47,16 @@ namespace Flow.Plugin.WindowsSettings.Classes
|
|||
/// </summary>
|
||||
public IEnumerable<string>? AltNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Keywords names of this task link.
|
||||
/// </summary>
|
||||
public IEnumerable<IEnumerable<string>>? Keywords { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Ghyph of this setting
|
||||
/// </summary>
|
||||
public string? glyph { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a additional note of this settings.
|
||||
/// <para>(e.g. why is not supported on your system)</para>
|
||||
|
|
|
|||
25
Flow.Plugin.WindowsSettings.sln
Normal file
25
Flow.Plugin.WindowsSettings.sln
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31512.422
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Flow.Plugin.WindowsSettings", "Flow.Plugin.WindowsSettings.csproj", "{5043CECE-E6A7-4867-9CBE-02D27D83747A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Debug|x64.Build.0 = Debug|x64
|
||||
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Release|x64.ActiveCfg = Release|x64
|
||||
{5043CECE-E6A7-4867-9CBE-02D27D83747A}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {EA85E245-28F0-4192-B9E7-6FA8CFF3D3CD}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -69,7 +69,20 @@ namespace Flow.Plugin.WindowsSettings.Helper
|
|||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
if (result is null && entry.Keywords is not null)
|
||||
{
|
||||
string[] searchKeywords = query.Terms[(string.IsNullOrEmpty(query.ActionKeyword) ? 0 : 1)..];
|
||||
|
||||
if (searchKeywords
|
||||
.All(x => entry
|
||||
.Keywords
|
||||
.SelectMany(x => x)
|
||||
.Contains(x, StringComparer.CurrentCultureIgnoreCase))
|
||||
)
|
||||
result = NewSettingResult(midScore);
|
||||
}
|
||||
}
|
||||
|
||||
if (result is null)
|
||||
continue;
|
||||
|
||||
|
|
@ -82,7 +95,7 @@ namespace Flow.Plugin.WindowsSettings.Helper
|
|||
Action = _ => DoOpenSettingsAction(entry),
|
||||
IcoPath = iconPath,
|
||||
SubTitle = $"{Resources.Area} \"{entry.Area}\" {Resources.SubtitlePreposition} {entry.Type}",
|
||||
Title = entry.Name,
|
||||
Title = entry.Name + entry.glyph,
|
||||
ContextData = entry,
|
||||
Score = score
|
||||
};
|
||||
|
|
|
|||
12262
WindowsSettings.json
12262
WindowsSettings.json
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue