Hide options for channel configuration

This commit is contained in:
pizzaboxer 2023-11-03 08:54:44 +00:00
parent 456c3e48ad
commit 2552b3139d
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
3 changed files with 136 additions and 127 deletions

View File

@ -5,8 +5,9 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml" xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Menu.Pages" xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Menu.Pages"
xmlns:models="clr-namespace:Bloxstrap.UI.ViewModels.Menu" xmlns:models="clr-namespace:Bloxstrap.UI.ViewModels"
d:DataContext="{d:DesignInstance Type=models:BehaviourViewModel}" xmlns:menuModels="clr-namespace:Bloxstrap.UI.ViewModels.Menu"
d:DataContext="{d:DesignInstance Type=menuModels:BehaviourViewModel}"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="800" d:DesignHeight="600" d:DesignWidth="800"
Title="BehaviourPage" Title="BehaviourPage"
@ -35,6 +36,29 @@
<ui:ToggleSwitch IsChecked="{Binding UpdateCheckingEnabled, Mode=TwoWay}" /> <ui:ToggleSwitch IsChecked="{Binding UpdateCheckingEnabled, Mode=TwoWay}" />
</ui:CardControl> </ui:CardControl>
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Style>
<Style TargetType="ui:CardControl" BasedOn="{StaticResource {x:Type ui:CardControl}}">
<Style.Triggers>
<DataTrigger Binding="{Binding ForceRobloxReinstallation, Mode=OneTime}" Value="True">
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
</Style.Triggers>
</Style>
</ui:CardControl.Style>
<ui:CardControl.Header>
<StackPanel>
<TextBlock FontSize="14" Text="Force Roblox reinstallation" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Roblox will be installed fresh on next launch." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding ForceRobloxReinstallation, Mode=TwoWay}" />
</ui:CardControl>
<StackPanel Visibility="{Binding Source={x:Static models:GlobalViewModel.ShowDebugStuff}, Mode=OneTime}">
<TextBlock Text="lol" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<ui:CardExpander Margin="0,8,0,0" IsExpanded="True"> <ui:CardExpander Margin="0,8,0,0" IsExpanded="True">
<ui:CardExpander.Header> <ui:CardExpander.Header>
<Grid> <Grid>
@ -157,24 +181,6 @@
</ui:CardControl.Header> </ui:CardControl.Header>
<ComboBox Margin="5,0,0,0" Padding="10,5,10,5" Width="200" ItemsSource="{Binding ChannelChangeModes.Keys, Mode=OneTime}" Text="{Binding SelectedChannelChangeMode, Mode=TwoWay}" /> <ComboBox Margin="5,0,0,0" Padding="10,5,10,5" Width="200" ItemsSource="{Binding ChannelChangeModes.Keys, Mode=OneTime}" Text="{Binding SelectedChannelChangeMode, Mode=TwoWay}" />
</ui:CardControl> </ui:CardControl>
<ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Style>
<Style TargetType="ui:CardControl" BasedOn="{StaticResource {x:Type ui:CardControl}}">
<Style.Triggers>
<DataTrigger Binding="{Binding ForceRobloxReinstallation, Mode=OneTime}" Value="True">
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
</Style.Triggers>
</Style>
</ui:CardControl.Style>
<ui:CardControl.Header>
<StackPanel>
<TextBlock FontSize="14" Text="Force Roblox reinstallation" />
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Roblox will be installed fresh on next launch." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
</StackPanel> </StackPanel>
</ui:CardControl.Header>
<ui:ToggleSwitch IsChecked="{Binding ForceRobloxReinstallation, Mode=TwoWay}" />
</ui:CardControl>
</StackPanel> </StackPanel>
</ui:UiPage> </ui:UiPage>

View File

@ -34,7 +34,7 @@
</ui:CardAction> </ui:CardAction>
</Grid> </Grid>
<StackPanel Visibility="{Binding ShowDebugFlags, Mode=OneTime}"> <StackPanel Visibility="{Binding Source={x:Static models:GlobalViewModel.ShowDebugStuff}, Mode=OneTime}">
<TextBlock Text="Debug" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" /> <TextBlock Text="Debug" FontSize="16" FontWeight="Medium" Margin="0,16,0,0" />
<ui:CardControl Margin="0,8,0,0"> <ui:CardControl Margin="0,8,0,0">
<ui:CardControl.Header> <ui:CardControl.Header>

View File

@ -1,4 +1,5 @@
using System.Windows.Input; using System.Windows;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Input;
namespace Bloxstrap.UI.ViewModels namespace Bloxstrap.UI.ViewModels
@ -9,6 +10,8 @@ namespace Bloxstrap.UI.ViewModels
public static bool IsNotFirstRun => !App.IsFirstRun; public static bool IsNotFirstRun => !App.IsFirstRun;
public static Visibility ShowDebugStuff => App.Settings.Prop.OhHeyYouFoundMe ? Visibility.Visible : Visibility.Collapsed;
private static void OpenWebpage(string? location) private static void OpenWebpage(string? location)
{ {
if (location is null) if (location is null)