Add unknown source warning setting

This commit is contained in:
Jack251970 2025-06-01 16:28:16 +08:00
parent 406c29f0d6
commit 6bf7f00f0a
3 changed files with 24 additions and 10 deletions

View file

@ -191,6 +191,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public int MaxHistoryResultsToShowForHomePage { get; set; } = 5;
public bool AutoRestartAfterChanging { get; set; } = false;
public bool ShowUnknownSourceWarning { get; set; } = true;
public int CustomExplorerIndex { get; set; } = 0;

View file

@ -133,6 +133,8 @@
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
<system:String x:Key="autoRestartAfterChanging">Automatically restart after changing plugins</system:String>
<system:String x:Key="autoRestartAfterChangingToolTip">Automatically restart Flow Launcher after installing/uninstalling/updating plugins</system:String>
<system:String x:Key="showUnknownSourceWarning">Show unknown source warning</system:String>
<system:String x:Key="showUnknownSourceWarningToolTip">Show warning when installing plugins from unknown sources</system:String>
<!-- Setting Plugin -->
<system:String x:Key="searchplugin">Search Plugin</system:String>

View file

@ -202,16 +202,27 @@
</cc:Card>
</cc:CardGroup>
<cc:Card
Title="{DynamicResource autoRestartAfterChanging}"
Margin="0 14 0 0"
Icon="&#xF83E;"
Sub="{DynamicResource autoRestartAfterChangingToolTip}">
<ui:ToggleSwitch
IsOn="{Binding Settings.AutoRestartAfterChanging}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<cc:CardGroup Margin="0 14 0 0">
<cc:Card
Title="{DynamicResource autoRestartAfterChanging}"
Icon="&#xF83E;"
Sub="{DynamicResource autoRestartAfterChangingToolTip}">
<ui:ToggleSwitch
IsOn="{Binding Settings.AutoRestartAfterChanging}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
<cc:Card
Title="{DynamicResource showUnknownSourceWarning}"
Icon="&#xE7BA;"
Sub="{DynamicResource showUnknownSourceWarningToolTip}">
<ui:ToggleSwitch
IsOn="{Binding Settings.ShowUnknownSourceWarning}"
OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" />
</cc:Card>
</cc:CardGroup>
<cc:ExCard
Title="{DynamicResource searchDelay}"