Add ability to toggle Fast Flag manager

This commit is contained in:
pizzaboxer 2024-06-28 19:03:52 +04:00
parent fdcc21de36
commit df044eef5f
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
6 changed files with 43 additions and 4 deletions

View File

@ -1258,6 +1258,9 @@ namespace Bloxstrap
continue;
}
if (!App.Settings.Prop.UseFastFlagManager && String.Equals(relativeFile, "ClientSettings\\ClientAppSettings.json", StringComparison.OrdinalIgnoreCase))
continue;
if (relativeFile.EndsWith(".lock"))
continue;

View File

@ -15,6 +15,7 @@ namespace Bloxstrap.Models
public bool ConfirmLaunches { get; set; } = false;
public string Locale { get; set; } = "nil";
public bool ForceRobloxLanguage { get; set; } = false;
public bool UseFastFlagManager { get; set; } = true;
// channel configuration
public string Channel { get; set; } = RobloxDeployment.DefaultChannel;

View File

@ -1878,7 +1878,7 @@ namespace Bloxstrap.Resources {
/// <summary>
/// Looks up a localized string similar to Fast Flags are extremely powerful, being that they are intended to only be used by Roblox engineers. While they can be very useful, manually configuring them can cause serious issues with stability and functionality. Do NOT use the editor if you are unsure of what you are doing.
///
///Do NOT use this to import large &quot;flag lists&quot; made by other people that promise to improve performance or such. They are subject to the aforementioned issues, and they will cause problems for you since you will not be fully aware [rest of string was truncated]&quot;;.
///Do NOT use this to import large &quot;flag lists&quot; made by other people that promise to improve performance or such. They are subject to the aforementioned issues, and they will cause problems for you since you will not be fully aware of [rest of string was truncated]&quot;;.
/// </summary>
public static string Menu_FastFlagEditor_Warning_Text {
get {
@ -1913,6 +1913,24 @@ namespace Bloxstrap.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Choose whether to allow Bloxstrap to manage Fast Flags.
/// </summary>
public static string Menu_FastFlags_ManagerEnabled_Description {
get {
return ResourceManager.GetString("Menu.FastFlags.ManagerEnabled.Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Enable Fast Flag manager.
/// </summary>
public static string Menu_FastFlags_ManagerEnabled_Title {
get {
return ResourceManager.GetString("Menu.FastFlags.ManagerEnabled.Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Toggle between using the consolidated 1-10 / fine-grained 1-21 graphics quality slider..
/// </summary>
@ -1941,7 +1959,7 @@ namespace Bloxstrap.Resources {
}
/// <summary>
/// Looks up a localized string similar to UI and Layout.
/// Looks up a localized string similar to User Interface and Layout.
/// </summary>
public static string Menu_FastFlags_Presets_Categories_UserInterface {
get {

View File

@ -1051,4 +1051,9 @@ Scroll for more languages.</value>
<data name="Menu.FastFlags.Presets.Categories.UserInterface" xml:space="preserve">
<value>User Interface and Layout</value>
</data>
<value>Enable Fast Flag manager</value>
</data>
<data name="Menu.FastFlags.ManagerEnabled.Description" xml:space="preserve">
<value>Choose whether Fast Flags configured here should apply to Roblox</value>
</data>
</root>

View File

@ -15,14 +15,20 @@
<StackPanel Margin="0,0,14,14">
<TextBlock Margin="0,0,0,16" Text="{x:Static resources:Strings.Menu_FastFlags_Description}" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" />
<ui:CardAction Grid.Column="0" Icon="BookQuestionMark24" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/pizzaboxer/bloxstrap/wiki/A-guide-to-FastFlags">
<ui:CardAction Icon="BookQuestionMark24" Command="models:GlobalViewModel.OpenWebpageCommand" CommandParameter="https://github.com/pizzaboxer/bloxstrap/wiki/A-guide-to-FastFlags">
<StackPanel>
<TextBlock FontSize="14" Text="{x:Static resources:Strings.Common_Help}" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="{x:Static resources:Strings.Menu_FastFlags_Help_Description}" Padding="0,0,16,0" Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardAction>
<controls:OptionControl
Header="{x:Static resources:Strings.Menu_FastFlags_ManagerEnabled_Title}"
Description="{x:Static resources:Strings.Menu_FastFlags_ManagerEnabled_Description}">
<ui:ToggleSwitch IsChecked="{Binding UseFastFlagManager, Mode=TwoWay}" />
</controls:OptionControl>
<StackPanel Visibility="{Binding ShowDebugFlags, Mode=OneTime}">
<StackPanel Visibility="{Binding ShowDebugFlags, Mode=OneTime}">
<TextBlock Text="{x:Static resources:Strings.Menu_FastFlags_Presets_Debug_Title}" FontSize="20" FontWeight="Medium" Margin="0,16,0,0" />
<controls:OptionControl

View File

@ -39,6 +39,12 @@ namespace Bloxstrap.UI.ViewModels.Menu
public Visibility ShowDebugFlags => Visibility.Collapsed;
#endif
public bool UseFastFlagManager
{
get => App.Settings.Prop.UseFastFlagManager;
set => App.Settings.Prop.UseFastFlagManager = value;
}
public bool HttpRequestLogging
{
get => App.FastFlags.GetPreset("HTTP.Log") is not null;