mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'dev' into rename-file
This commit is contained in:
commit
95fadcbcfa
8 changed files with 77 additions and 33 deletions
|
|
@ -189,31 +189,46 @@ namespace Flow.Launcher
|
||||||
var releases = JsonSerializer.Deserialize<List<GitHubReleaseInfo>>(releaseNotesJSON);
|
var releases = JsonSerializer.Deserialize<List<GitHubReleaseInfo>>(releaseNotesJSON);
|
||||||
|
|
||||||
// Get the latest releases
|
// 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
|
// Build the release notes in Markdown format
|
||||||
var releaseNotesHtmlBuilder = new StringBuilder(string.Empty);
|
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);
|
releaseNotesHtmlBuilder.AppendLine("# " + release.Name);
|
||||||
|
|
||||||
// Because MdXaml.Html package cannot correctly render images without units,
|
// Because MdXaml.Html package cannot correctly render images without units,
|
||||||
// We need to manually add unit for images
|
// We need to manually add unit for images
|
||||||
// E.g. Replace <img src="..." width="500"> with <img src="..." width="500px">
|
// E.g. Replace <img src="..." width="500"> with <img src="..." width="500px">
|
||||||
var notes = ImageUnitRegex().Replace(release.ReleaseNotes, m =>
|
var notes = ImageUnitRegex().Replace(release.ReleaseNotes, m =>
|
||||||
{
|
{
|
||||||
var prefix = m.Groups[1].Value;
|
var prefix = m.Groups[1].Value;
|
||||||
var widthValue = m.Groups[2].Value;
|
var widthValue = m.Groups[2].Value;
|
||||||
var quote = m.Groups[3].Value;
|
var quote = m.Groups[3].Value;
|
||||||
var suffix = m.Groups[4].Value;
|
var suffix = m.Groups[4].Value;
|
||||||
// Only replace if width is number like 500 without units like 500px
|
// Only replace if width is number like 500 without units like 500px
|
||||||
if (IsNumber(widthValue))
|
if (IsNumber(widthValue))
|
||||||
return $"{prefix}{widthValue}px{quote}{suffix}";
|
return $"{prefix}{widthValue}px{quote}{suffix}";
|
||||||
return m.Value;
|
return m.Value;
|
||||||
});
|
});
|
||||||
|
|
||||||
releaseNotesHtmlBuilder.AppendLine(notes);
|
releaseNotesHtmlBuilder.AppendLine(notes);
|
||||||
releaseNotesHtmlBuilder.AppendLine();
|
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();
|
return releaseNotesHtmlBuilder.ToString();
|
||||||
|
|
|
||||||
|
|
@ -38,21 +38,21 @@
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
</DataTrigger>
|
</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="Margin" Value="0" />
|
||||||
<Setter Property="CornerRadius" Value="0" />
|
<Setter Property="CornerRadius" Value="0" />
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0" />
|
<Setter Property="BorderThickness" Value="0" />
|
||||||
</DataTrigger>
|
</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="Margin" Value="0" />
|
||||||
<Setter Property="CornerRadius" Value="0" />
|
<Setter Property="CornerRadius" Value="0" />
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
<Setter Property="BorderThickness" Value="0 1 0 0" />
|
<Setter Property="BorderThickness" Value="0 1 0 0" />
|
||||||
</DataTrigger>
|
</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="Margin" Value="0" />
|
||||||
<Setter Property="CornerRadius" Value="0" />
|
<Setter Property="CornerRadius" Value="0" />
|
||||||
<Setter Property="Background" Value="Transparent" />
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,10 @@ namespace Flow.Launcher.Resources.Controls
|
||||||
{
|
{
|
||||||
Default,
|
Default,
|
||||||
Inside,
|
Inside,
|
||||||
InsideFit
|
InsideFit,
|
||||||
|
First,
|
||||||
|
Middle,
|
||||||
|
Last
|
||||||
}
|
}
|
||||||
|
|
||||||
public Card()
|
public Card()
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,10 @@
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:CardGroup Margin="0 4 0 0">
|
<cc:CardGroup Margin="0 4 0 0">
|
||||||
<cc:Card Title="{DynamicResource SearchWindowPosition}" Icon="">
|
<cc:Card
|
||||||
|
Title="{DynamicResource SearchWindowPosition}"
|
||||||
|
Icon=""
|
||||||
|
Type="First">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<ComboBox
|
<ComboBox
|
||||||
MinWidth="220"
|
MinWidth="220"
|
||||||
|
|
@ -116,6 +119,7 @@
|
||||||
<cc:Card
|
<cc:Card
|
||||||
Title="{DynamicResource SearchWindowAlign}"
|
Title="{DynamicResource SearchWindowAlign}"
|
||||||
Icon=""
|
Icon=""
|
||||||
|
Type="Last"
|
||||||
Visibility="{ext:CollapsedWhen {Binding Settings.SearchWindowScreen},
|
Visibility="{ext:CollapsedWhen {Binding Settings.SearchWindowScreen},
|
||||||
IsEqualTo={x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}}">
|
IsEqualTo={x:Static userSettings:SearchWindowScreens.RememberLastLaunchLocation}}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
|
@ -196,7 +200,10 @@
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:CardGroup Margin="0 14 0 0">
|
<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
|
<ComboBox
|
||||||
MaxWidth="200"
|
MaxWidth="200"
|
||||||
DisplayMemberPath="Display"
|
DisplayMemberPath="Display"
|
||||||
|
|
@ -205,7 +212,10 @@
|
||||||
SelectedValuePath="Value" />
|
SelectedValuePath="Value" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource lastQueryMode}" Sub="{DynamicResource lastQueryModeToolTip}">
|
<cc:Card
|
||||||
|
Title="{DynamicResource lastQueryMode}"
|
||||||
|
Sub="{DynamicResource lastQueryModeToolTip}"
|
||||||
|
Type="Last">
|
||||||
<ComboBox
|
<ComboBox
|
||||||
MinWidth="210"
|
MinWidth="210"
|
||||||
DisplayMemberPath="Display"
|
DisplayMemberPath="Display"
|
||||||
|
|
@ -375,7 +385,8 @@
|
||||||
<cc:Card
|
<cc:Card
|
||||||
Title="{DynamicResource KoreanImeRegistry}"
|
Title="{DynamicResource KoreanImeRegistry}"
|
||||||
Icon=""
|
Icon=""
|
||||||
Sub="{DynamicResource KoreanImeRegistryTooltip}">
|
Sub="{DynamicResource KoreanImeRegistryTooltip}"
|
||||||
|
Type="First">
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
IsOn="{Binding LegacyKoreanIMEEnabled}"
|
IsOn="{Binding LegacyKoreanIMEEnabled}"
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
|
|
@ -384,7 +395,8 @@
|
||||||
<cc:Card
|
<cc:Card
|
||||||
Title="{DynamicResource KoreanImeOpenLink}"
|
Title="{DynamicResource KoreanImeOpenLink}"
|
||||||
Icon=""
|
Icon=""
|
||||||
Sub="{DynamicResource KoreanImeOpenLinkToolTip}">
|
Sub="{DynamicResource KoreanImeOpenLinkToolTip}"
|
||||||
|
Type="Last">
|
||||||
<Button Command="{Binding OpenImeSettingsCommand}" Content="{DynamicResource KoreanImeOpenLinkButton}" />
|
<Button Command="{Binding OpenImeSettingsCommand}" Content="{DynamicResource KoreanImeOpenLinkButton}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
</cc:CardGroup>
|
</cc:CardGroup>
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,10 @@
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:CardGroup Margin="0 12 0 0">
|
<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
|
<ComboBox
|
||||||
Width="120"
|
Width="120"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
|
|
@ -59,7 +62,10 @@
|
||||||
SelectedValue="{Binding Settings.OpenResultModifiers}" />
|
SelectedValue="{Binding Settings.OpenResultModifiers}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource showOpenResultHotkey}" Sub="{DynamicResource showOpenResultHotkeyToolTip}">
|
<cc:Card
|
||||||
|
Title="{DynamicResource showOpenResultHotkey}"
|
||||||
|
Sub="{DynamicResource showOpenResultHotkeyToolTip}"
|
||||||
|
Type="Last">
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
IsOn="{Binding Settings.ShowOpenResultHotkey}"
|
IsOn="{Binding Settings.ShowOpenResultHotkey}"
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
|
|
|
||||||
|
|
@ -32,35 +32,35 @@
|
||||||
TextAlignment="left" />
|
TextAlignment="left" />
|
||||||
|
|
||||||
<cc:CardGroup>
|
<cc:CardGroup>
|
||||||
<cc:Card Title="{DynamicResource enableProxy}">
|
<cc:Card Title="{DynamicResource enableProxy}" Type="First">
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
IsOn="{Binding Settings.Proxy.Enabled}"
|
IsOn="{Binding Settings.Proxy.Enabled}"
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource server}">
|
<cc:Card Title="{DynamicResource server}" Type="Middle">
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="300"
|
Width="300"
|
||||||
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
||||||
Text="{Binding Settings.Proxy.Server}" />
|
Text="{Binding Settings.Proxy.Server}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource port}">
|
<cc:Card Title="{DynamicResource port}" Type="Middle">
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="100"
|
Width="100"
|
||||||
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
||||||
Text="{Binding Settings.Proxy.Port, TargetNullValue={x:Static sys:String.Empty}}" />
|
Text="{Binding Settings.Proxy.Port, TargetNullValue={x:Static sys:String.Empty}}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource userName}">
|
<cc:Card Title="{DynamicResource userName}" Type="Middle">
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="200"
|
Width="200"
|
||||||
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
||||||
Text="{Binding Settings.Proxy.UserName}" />
|
Text="{Binding Settings.Proxy.UserName}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource password}">
|
<cc:Card Title="{DynamicResource password}" Type="Last">
|
||||||
<TextBox
|
<TextBox
|
||||||
Width="200"
|
Width="200"
|
||||||
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
IsEnabled="{Binding Settings.Proxy.Enabled}"
|
||||||
|
|
|
||||||
|
|
@ -489,7 +489,8 @@
|
||||||
Title="{DynamicResource BackdropType}"
|
Title="{DynamicResource BackdropType}"
|
||||||
Margin="0 0 0 0"
|
Margin="0 0 0 0"
|
||||||
Icon=""
|
Icon=""
|
||||||
Sub="{Binding BackdropSubText}">
|
Sub="{Binding BackdropSubText}"
|
||||||
|
Type="First">
|
||||||
<ComboBox
|
<ComboBox
|
||||||
MinWidth="160"
|
MinWidth="160"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
|
@ -505,7 +506,8 @@
|
||||||
<cc:Card
|
<cc:Card
|
||||||
Title="{DynamicResource queryWindowShadowEffect}"
|
Title="{DynamicResource queryWindowShadowEffect}"
|
||||||
Margin="0 0 0 0"
|
Margin="0 0 0 0"
|
||||||
Icon="">
|
Icon=""
|
||||||
|
Type="Last">
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
IsEnabled="{Binding IsDropShadowEnabled}"
|
IsEnabled="{Binding IsDropShadowEnabled}"
|
||||||
IsOn="{Binding DropShadowEffect}"
|
IsOn="{Binding DropShadowEffect}"
|
||||||
|
|
@ -546,7 +548,10 @@
|
||||||
|
|
||||||
<!-- Time and date -->
|
<!-- Time and date -->
|
||||||
<cc:CardGroup Margin="0 14 0 0">
|
<cc:CardGroup Margin="0 14 0 0">
|
||||||
<cc:Card Title="{DynamicResource Clock}" Icon="">
|
<cc:Card
|
||||||
|
Title="{DynamicResource Clock}"
|
||||||
|
Icon=""
|
||||||
|
Type="First">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
|
@ -567,7 +572,10 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource Date}" Icon="">
|
<cc:Card
|
||||||
|
Title="{DynamicResource Date}"
|
||||||
|
Icon=""
|
||||||
|
Type="Last">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ namespace Flow.Launcher.Plugin.Calculator
|
||||||
@"bin2dec|hex2dec|oct2dec|" +
|
@"bin2dec|hex2dec|oct2dec|" +
|
||||||
@"factorial|sign|isprime|isinfty|" +
|
@"factorial|sign|isprime|isinfty|" +
|
||||||
@"==|~=|&&|\|\||(?:\<|\>)=?|" +
|
@"==|~=|&&|\|\||(?:\<|\>)=?|" +
|
||||||
@"[ei]|[0-9]|[\+\%\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
|
@"[ei]|[0-9]|0x[\da-fA-F]+|[\+\%\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
|
||||||
@")+$", RegexOptions.Compiled);
|
@")+$", RegexOptions.Compiled);
|
||||||
private static readonly Regex RegBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled);
|
private static readonly Regex RegBrackets = new Regex(@"[\(\)\[\]]", RegexOptions.Compiled);
|
||||||
private static Engine MagesEngine;
|
private static Engine MagesEngine;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue