mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Move auto channel change preference
moved to installation tab to make it clearer that it's related to channel preference
This commit is contained in:
parent
a0bebbaa20
commit
6d72ec973e
@ -1,9 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
namespace Bloxstrap.ViewModels
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
using Bloxstrap.Enums;
|
|
||||||
|
|
||||||
namespace Bloxstrap.ViewModels
|
|
||||||
{
|
{
|
||||||
public class BehaviourViewModel
|
public class BehaviourViewModel
|
||||||
{
|
{
|
||||||
@ -24,19 +19,5 @@ namespace Bloxstrap.ViewModels
|
|||||||
get => App.Settings.Prop.MultiInstanceLaunching;
|
get => App.Settings.Prop.MultiInstanceLaunching;
|
||||||
set => App.Settings.Prop.MultiInstanceLaunching = value;
|
set => App.Settings.Prop.MultiInstanceLaunching = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo - move to enum attributes?
|
|
||||||
public IReadOnlyDictionary<string, ChannelChangeMode> ChannelChangeModes => new Dictionary<string, ChannelChangeMode>
|
|
||||||
{
|
|
||||||
{ "Change automatically", ChannelChangeMode.Automatic },
|
|
||||||
{ "Always prompt", ChannelChangeMode.Prompt },
|
|
||||||
{ "Never change", ChannelChangeMode.Ignore },
|
|
||||||
};
|
|
||||||
|
|
||||||
public string SelectedChannelChangeMode
|
|
||||||
{
|
|
||||||
get => ChannelChangeModes.FirstOrDefault(x => x.Value == App.Settings.Prop.ChannelChangeMode).Key;
|
|
||||||
set => App.Settings.Prop.ChannelChangeMode = ChannelChangeModes[value];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ using System.Windows.Input;
|
|||||||
|
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
|
||||||
|
using Bloxstrap.Enums;
|
||||||
using Bloxstrap.Models;
|
using Bloxstrap.Models;
|
||||||
|
|
||||||
namespace Bloxstrap.ViewModels
|
namespace Bloxstrap.ViewModels
|
||||||
@ -117,5 +118,19 @@ namespace Bloxstrap.ViewModels
|
|||||||
// cant use data bindings so i have to do whatever tf this is
|
// cant use data bindings so i have to do whatever tf this is
|
||||||
public Visibility ChannelComboBoxVisibility => ManualChannelEntry ? Visibility.Collapsed : Visibility.Visible;
|
public Visibility ChannelComboBoxVisibility => ManualChannelEntry ? Visibility.Collapsed : Visibility.Visible;
|
||||||
public Visibility ChannelTextBoxVisibility => ManualChannelEntry ? Visibility.Visible : Visibility.Collapsed;
|
public Visibility ChannelTextBoxVisibility => ManualChannelEntry ? Visibility.Visible : Visibility.Collapsed;
|
||||||
|
|
||||||
|
// todo - move to enum attributes?
|
||||||
|
public IReadOnlyDictionary<string, ChannelChangeMode> ChannelChangeModes => new Dictionary<string, ChannelChangeMode>
|
||||||
|
{
|
||||||
|
{ "Change automatically", ChannelChangeMode.Automatic },
|
||||||
|
{ "Always prompt", ChannelChangeMode.Prompt },
|
||||||
|
{ "Never change", ChannelChangeMode.Ignore },
|
||||||
|
};
|
||||||
|
|
||||||
|
public string SelectedChannelChangeMode
|
||||||
|
{
|
||||||
|
get => ChannelChangeModes.FirstOrDefault(x => x.Value == App.Settings.Prop.ChannelChangeMode).Key;
|
||||||
|
set => App.Settings.Prop.ChannelChangeMode = ChannelChangeModes[value];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,14 +40,5 @@
|
|||||||
</ui:CardControl.Header>
|
</ui:CardControl.Header>
|
||||||
<ui:ToggleSwitch IsChecked="{Binding MultiInstanceLaunchingEnabled, Mode=TwoWay}" />
|
<ui:ToggleSwitch IsChecked="{Binding MultiInstanceLaunchingEnabled, Mode=TwoWay}" />
|
||||||
</ui:CardControl>
|
</ui:CardControl>
|
||||||
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12">
|
|
||||||
<ui:CardControl.Header>
|
|
||||||
<StackPanel>
|
|
||||||
<TextBlock FontSize="14" Text="Choose what to do on suggested channel change" />
|
|
||||||
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Roblox or Bloxstrap may try to change your preferred release channel." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
|
|
||||||
</StackPanel>
|
|
||||||
</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}" />
|
|
||||||
</ui:CardControl>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ui:UiPage>
|
</ui:UiPage>
|
||||||
|
@ -122,5 +122,14 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ui:CardExpander>
|
</ui:CardExpander>
|
||||||
|
<ui:CardControl Margin="0,8,0,0" Padding="16,13,16,12">
|
||||||
|
<ui:CardControl.Header>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock FontSize="14" Text="Automatic channel change action" />
|
||||||
|
<TextBlock Margin="0,2,0,0" FontSize="12" Text="Roblox or Bloxstrap may try to change your preferred channel." Foreground="{DynamicResource TextFillColorTertiaryBrush}" />
|
||||||
|
</StackPanel>
|
||||||
|
</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}" />
|
||||||
|
</ui:CardControl>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ui:UiPage>
|
</ui:UiPage>
|
||||||
|
Loading…
Reference in New Issue
Block a user