Merge branch 'dev' into administrator_mode

This commit is contained in:
Jack Ye 2025-06-28 18:26:29 +08:00 committed by GitHub
commit f02a6c5118
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 137 additions and 57 deletions

View file

@ -1,3 +1,5 @@
# This file should contain names of products, companies, or individuals that aren't in a standard dictionary (e.g., GitHub, Keptn, VSCode).
crowdin
DWM
workflows
@ -34,7 +36,6 @@ mscorlib
pythonw
dotnet
winget
jjw24
wolframalpha
gmail
duckduckgo
@ -49,7 +50,6 @@ srchadmin
EWX
dlgtext
CMD
appref-ms
appref
TSource
runas
@ -57,7 +57,6 @@ dpi
popup
ptr
pluginindicator
TobiasSekan
img
resx
bak
@ -68,9 +67,6 @@ dlg
ddd
dddd
clearlogfolder
ACCENT_ENABLE_TRANSPARENTGRADIENT
ACCENT_ENABLE_BLURBEHIND
WCA_ACCENT_POLICY
HGlobal
dopusrt
firefox
@ -91,22 +87,15 @@ keyevent
KListener
requery
vkcode
čeština
Polski
Srpski
Português
Português (Brasil)
Italiano
Slovenský
quicklook
Tiếng Việt
Droplex
Preinstalled
errormetadatafile
noresult
pluginsmanager
alreadyexists
JsonRPC
JsonRPCV2
Softpedia
img

View file

@ -1,4 +1,6 @@
# See https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples:-patterns
# This file should contain strings that contain a mix of letters and numbers, or specific symbols
# Questionably acceptable forms of `in to`
# Personally, I prefer `log into`, but people object
@ -121,3 +123,13 @@
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))
\bjjw24\b
\bappref-ms\b
\bTobiasSekan\b
\bJsonRPC\b
\bJsonRPCV2\b
\bTiếng Việt\b
\bPortuguês (Brasil)\b
\bčeština\b
\bPortuguês\b

View file

@ -189,31 +189,46 @@ namespace Flow.Launcher
var releases = JsonSerializer.Deserialize<List<GitHubReleaseInfo>>(releaseNotesJSON);
// Get the latest releases
var latestReleases = releases.OrderByDescending(release => release.PublishedDate).Take(3);
var latestReleases = releases.OrderByDescending(release => release.PublishedDate).Take(3).ToList();
// Build the release notes in Markdown format
var releaseNotesHtmlBuilder = new StringBuilder(string.Empty);
foreach (var release in latestReleases)
for (int i = 0; i < latestReleases.Count; i++)
{
var release = latestReleases[i];
releaseNotesHtmlBuilder.AppendLine("# " + release.Name);
// Because MdXaml.Html package cannot correctly render images without units,
// We need to manually add unit for images
// E.g. Replace <img src="..." width="500"> with <img src="..." width="500px">
var notes = ImageUnitRegex().Replace(release.ReleaseNotes, m =>
{
var prefix = m.Groups[1].Value;
var widthValue = m.Groups[2].Value;
var quote = m.Groups[3].Value;
var suffix = m.Groups[4].Value;
// Only replace if width is number like 500 without units like 500px
if (IsNumber(widthValue))
return $"{prefix}{widthValue}px{quote}{suffix}";
return m.Value;
});
{
var prefix = m.Groups[1].Value;
var widthValue = m.Groups[2].Value;
var quote = m.Groups[3].Value;
var suffix = m.Groups[4].Value;
// Only replace if width is number like 500 without units like 500px
if (IsNumber(widthValue))
return $"{prefix}{widthValue}px{quote}{suffix}";
return m.Value;
});
releaseNotesHtmlBuilder.AppendLine(notes);
releaseNotesHtmlBuilder.AppendLine();
// Add separator if it is not last release note
if (i < latestReleases.Count - 1)
{
releaseNotesHtmlBuilder.Append("<br />");
releaseNotesHtmlBuilder.Append("\n\n");
releaseNotesHtmlBuilder.AppendLine("---");
releaseNotesHtmlBuilder.Append("\n\n");
releaseNotesHtmlBuilder.Append("<br />");
releaseNotesHtmlBuilder.Append("\n\n");
}
}
return releaseNotesHtmlBuilder.ToString();

View file

@ -38,21 +38,21 @@
<Setter Property="Background" Value="Transparent" />
</DataTrigger>
<DataTrigger Binding="{Binding (local:CardGroup.Position), RelativeSource={RelativeSource AncestorType=local:Card}}" Value="First">
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="First">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
</DataTrigger>
<DataTrigger Binding="{Binding (local:CardGroup.Position), RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Middle">
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Middle">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0 1 0 0" />
</DataTrigger>
<DataTrigger Binding="{Binding (local:CardGroup.Position), RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Last">
<DataTrigger Binding="{Binding Type, RelativeSource={RelativeSource AncestorType=local:Card}}" Value="Last">
<Setter Property="Margin" Value="0" />
<Setter Property="CornerRadius" Value="0" />
<Setter Property="Background" Value="Transparent" />

View file

@ -9,7 +9,10 @@ namespace Flow.Launcher.Resources.Controls
{
Default,
Inside,
InsideFit
InsideFit,
First,
Middle,
Last
}
public Card()

View file

@ -170,7 +170,8 @@ public partial class SettingsPaneThemeViewModel : BaseModel
"dddd dd', 'MMMM",
"dd', 'MMMM",
"dd.MM.yy",
"dd.MM.yyyy"
"dd.MM.yyyy",
"dd MMMM yyyy"
};
public string TimeFormat

View file

@ -100,7 +100,10 @@
</cc:Card>
<cc:CardGroup Margin="0 4 0 0">
<cc:Card Title="{DynamicResource SearchWindowPosition}" Icon="&#xe7f4;">
<cc:Card
Title="{DynamicResource SearchWindowPosition}"
Icon="&#xe7f4;"
Type="First">
<StackPanel Orientation="Horizontal">
<ComboBox
MinWidth="220"
@ -125,6 +128,7 @@
<cc:Card
Title="{DynamicResource SearchWindowAlign}"
Icon="&#xe7f4;"
Type="Last"
Visibility="{ext:CollapsedWhen {Binding Settings.SearchWindowScreen},
IsEqualTo={x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}}">
<StackPanel Orientation="Horizontal">
@ -205,7 +209,10 @@
</cc:Card>
<cc:CardGroup Margin="0 14 0 0">
<cc:Card Title="{DynamicResource querySearchPrecision}" Sub="{DynamicResource querySearchPrecisionToolTip}">
<cc:Card
Title="{DynamicResource querySearchPrecision}"
Sub="{DynamicResource querySearchPrecisionToolTip}"
Type="First">
<ComboBox
MaxWidth="200"
DisplayMemberPath="Display"
@ -214,7 +221,10 @@
SelectedValuePath="Value" />
</cc:Card>
<cc:Card Title="{DynamicResource lastQueryMode}" Sub="{DynamicResource lastQueryModeToolTip}">
<cc:Card
Title="{DynamicResource lastQueryMode}"
Sub="{DynamicResource lastQueryModeToolTip}"
Type="Last">
<ComboBox
MinWidth="210"
DisplayMemberPath="Display"
@ -384,7 +394,8 @@
<cc:Card
Title="{DynamicResource KoreanImeRegistry}"
Icon="&#xe88b;"
Sub="{DynamicResource KoreanImeRegistryTooltip}">
Sub="{DynamicResource KoreanImeRegistryTooltip}"
Type="First">
<ui:ToggleSwitch
IsOn="{Binding LegacyKoreanIMEEnabled}"
OffContent="{DynamicResource disable}"
@ -393,7 +404,8 @@
<cc:Card
Title="{DynamicResource KoreanImeOpenLink}"
Icon="&#xF210;"
Sub="{DynamicResource KoreanImeOpenLinkToolTip}">
Sub="{DynamicResource KoreanImeOpenLinkToolTip}"
Type="Last">
<Button Command="{Binding OpenImeSettingsCommand}" Content="{DynamicResource KoreanImeOpenLinkButton}" />
</cc:Card>
</cc:CardGroup>

View file

@ -51,7 +51,10 @@
</cc:Card>
<cc:CardGroup Margin="0 12 0 0">
<cc:Card Title="{DynamicResource openResultModifiers}" Sub="{DynamicResource openResultModifiersToolTip}">
<cc:Card
Title="{DynamicResource openResultModifiers}"
Sub="{DynamicResource openResultModifiersToolTip}"
Type="First">
<ComboBox
Width="120"
FontSize="14"
@ -59,7 +62,10 @@
SelectedValue="{Binding Settings.OpenResultModifiers}" />
</cc:Card>
<cc:Card Title="{DynamicResource showOpenResultHotkey}" Sub="{DynamicResource showOpenResultHotkeyToolTip}">
<cc:Card
Title="{DynamicResource showOpenResultHotkey}"
Sub="{DynamicResource showOpenResultHotkeyToolTip}"
Type="Last">
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowOpenResultHotkey}"
OffContent="{DynamicResource disable}"

View file

@ -32,35 +32,35 @@
TextAlignment="left" />
<cc:CardGroup>
<cc:Card Title="{DynamicResource enableProxy}">
<cc:Card Title="{DynamicResource enableProxy}" Type="First">
<ui:ToggleSwitch
IsOn="{Binding Settings.Proxy.Enabled}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<cc:Card Title="{DynamicResource server}">
<cc:Card Title="{DynamicResource server}" Type="Middle">
<TextBox
Width="300"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.Server}" />
</cc:Card>
<cc:Card Title="{DynamicResource port}">
<cc:Card Title="{DynamicResource port}" Type="Middle">
<TextBox
Width="100"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.Port, TargetNullValue={x:Static sys:String.Empty}}" />
</cc:Card>
<cc:Card Title="{DynamicResource userName}">
<cc:Card Title="{DynamicResource userName}" Type="Middle">
<TextBox
Width="200"
IsEnabled="{Binding Settings.Proxy.Enabled}"
Text="{Binding Settings.Proxy.UserName}" />
</cc:Card>
<cc:Card Title="{DynamicResource password}">
<cc:Card Title="{DynamicResource password}" Type="Last">
<TextBox
Width="200"
IsEnabled="{Binding Settings.Proxy.Enabled}"

View file

@ -489,7 +489,8 @@
Title="{DynamicResource BackdropType}"
Margin="0 0 0 0"
Icon="&#xeb42;"
Sub="{Binding BackdropSubText}">
Sub="{Binding BackdropSubText}"
Type="First">
<ComboBox
MinWidth="160"
VerticalAlignment="Center"
@ -505,7 +506,8 @@
<cc:Card
Title="{DynamicResource queryWindowShadowEffect}"
Margin="0 0 0 0"
Icon="&#xeb91;">
Icon="&#xeb91;"
Type="Last">
<ui:ToggleSwitch
IsEnabled="{Binding IsDropShadowEnabled}"
IsOn="{Binding DropShadowEffect}"
@ -546,7 +548,10 @@
<!-- Time and date -->
<cc:CardGroup Margin="0 14 0 0">
<cc:Card Title="{DynamicResource Clock}" Icon="&#xec92;">
<cc:Card
Title="{DynamicResource Clock}"
Icon="&#xec92;"
Type="First">
<StackPanel Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
@ -567,7 +572,10 @@
</StackPanel>
</cc:Card>
<cc:Card Title="{DynamicResource Date}" Icon="&#xe787;">
<cc:Card
Title="{DynamicResource Date}"
Icon="&#xe787;"
Type="Last">
<StackPanel Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"

View file

@ -20,7 +20,7 @@ namespace Flow.Launcher.Plugin.Calculator
@"bin2dec|hex2dec|oct2dec|" +
@"factorial|sign|isprime|isinfty|" +
@"==|~=|&&|\|\||(?:\<|\>)=?|" +
@"[ei]|[0-9]|[\+\%\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
@"[ei]|[0-9]|0x[\da-fA-F]+|[\+\%\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
@")+$", RegexOptions.Compiled);
private static readonly Regex RegBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled);
private static Engine MagesEngine;

View file

@ -2,11 +2,11 @@
"ID": "CEA0FDFC6D3B4085823D60DC76F28855",
"ActionKeyword": "*",
"Name": "Calculator",
"Description": "Provide mathematical calculations.(Try 5*3-2 in Flow Launcher)",
"Description": "Perform mathematical calculations (including hexadecimal values)",
"Author": "cxfksword",
"Version": "1.0.0",
"Language": "csharp",
"Website": "https://github.com/Flow-Launcher/Flow.Launcher",
"ExecuteFileName": "Flow.Launcher.Plugin.Calculator.dll",
"IcoPath": "Images\\calculator.png"
}
}

View file

@ -17,7 +17,7 @@ namespace Flow.Launcher.Plugin.Explorer
{
internal static PluginInitContext Context { get; set; }
internal Settings Settings;
internal static Settings Settings { get; set; }
private SettingsViewModel viewModel;

View file

@ -6,7 +6,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
{
internal static class QuickAccess
{
private const int quickAccessResultScore = 100;
private const int QuickAccessResultScore = 100;
internal static List<Result> AccessLinkListMatched(Query query, IEnumerable<AccessLink> accessLinks)
{
@ -19,8 +19,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
.ThenBy(x => x.Name)
.Select(l => l.Type switch
{
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, quickAccessResultScore),
ResultType.File => ResultManager.CreateFileResult(l.Path, query, quickAccessResultScore),
ResultType.Volume => ResultManager.CreateDriveSpaceDisplayResult(l.Path, query.ActionKeyword, QuickAccessResultScore),
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, QuickAccessResultScore),
ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore),
_ => throw new ArgumentOutOfRangeException()
})
.ToList();
@ -32,8 +33,9 @@ namespace Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks
.ThenBy(x => x.Name)
.Select(l => l.Type switch
{
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query),
ResultType.File => ResultManager.CreateFileResult(l.Path, query, quickAccessResultScore),
ResultType.Volume => ResultManager.CreateDriveSpaceDisplayResult(l.Path, query.ActionKeyword, QuickAccessResultScore),
ResultType.Folder => ResultManager.CreateFolderResult(l.Name, l.Path, l.Path, query, QuickAccessResultScore),
ResultType.File => ResultManager.CreateFileResult(l.Path, query, QuickAccessResultScore),
_ => throw new ArgumentOutOfRangeException()
}).ToList();
}

View file

@ -171,7 +171,17 @@ namespace Flow.Launcher.Plugin.Explorer.Search
};
}
internal static Result CreateDriveSpaceDisplayResult(string path, string actionKeyword, int score)
{
return CreateDriveSpaceDisplayResult(path, actionKeyword, score, SearchManager.UseIndexSearch(path));
}
internal static Result CreateDriveSpaceDisplayResult(string path, string actionKeyword, bool windowsIndexed = false)
{
return CreateDriveSpaceDisplayResult(path, actionKeyword, 500, windowsIndexed);
}
private static Result CreateDriveSpaceDisplayResult(string path, string actionKeyword, int score, bool windowsIndexed = false)
{
var progressBarColor = "#26a0da";
var title = string.Empty; // hide title when use progress bar,
@ -197,7 +207,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
SubTitle = subtitle,
AutoCompleteText = GetPathWithActionKeyword(path, ResultType.Folder, actionKeyword),
IcoPath = path,
Score = 500,
Score = score,
ProgressBar = progressValue,
ProgressBarColor = progressBarColor,
Preview = new Result.PreviewInfo

View file

@ -246,6 +246,18 @@ namespace Flow.Launcher.Plugin.Explorer.Search
public bool IsFileContentSearch(string actionKeyword) => actionKeyword == Settings.FileContentSearchActionKeyword;
public static bool UseIndexSearch(string path)
{
if (Main.Settings.IndexSearchEngine is not Settings.IndexSearchEngineOption.WindowsIndex)
return false;
// Check if the path is using windows index search
var pathToDirectory = FilesFolders.ReturnPreviousDirectoryIfIncompleteString(path);
return !Main.Settings.IndexSearchExcludedSubdirectoryPaths.Any(
x => FilesFolders.ReturnPreviousDirectoryIfIncompleteString(pathToDirectory).StartsWith(x.Path, StringComparison.OrdinalIgnoreCase))
&& WindowsIndex.WindowsIndex.PathIsIndexed(pathToDirectory);
}
private bool UseWindowsIndexForDirectorySearch(string locationPath)
{

View file

@ -69,7 +69,17 @@ deploy:
- provider: GitHub
repository: Flow-Launcher/Prereleases
release: v$(prereleaseTag)
description: 'This is the early access build of our upcoming release. All changes contained here are reviewed, tested and stable to use.\n\nSee our [release](https://github.com/Flow-Launcher/Flow.Launcher/pulls?q=is%3Aopen+is%3Apr+label%3Arelease) Pull Request for details.\n\nFor latest production release visit [here](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest)\n\nPlease report any bugs or issues over at the [main repository](https://github.com/Flow-Launcher/Flow.Launcher/issues)'
description: |
This is the early access build of our upcoming release.
All changes contained here are reviewed, tested and stable to use.
This build includes new changes from commit:
$(APPVEYOR_REPO_COMMIT_MESSAGE)
See all changes in this early access by going to the [milstones](https://github.com/Flow-Launcher/Flow.Launcher/milestones?sort=title&direction=asc) section and choosing the upcoming milestone.
For latest production release visit [here](https://github.com/Flow-Launcher/Flow.Launcher/releases/latest)
Please report any bugs or issues over at the [main repository](https://github.com/Flow-Launcher/Flow.Launcher/issues)'
auth_token:
secure: ij4UeXUYQBDJxn2YRAAhUOjklOGVKDB87Hn5J8tKIzj13yatoI7sLM666QDQFEgv
artifact: Squirrel Installer, Portable Version, Squirrel nupkg, Squirrel RELEASES