mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-10 09:04:23 +00:00
misc: chore: Rename UserSelectorDialog to ProfileSelectorDialog
This commit is contained in:
parent
06d34a5992
commit
d3f84a1305
@ -278,12 +278,12 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
.ForEach(profile => profiles.Add(new Models.UserProfile(profile, nav)));
|
||||
|
||||
profiles.Add(new Models.UserProfile(guest, nav));
|
||||
UserSelectorDialogViewModel viewModel = new()
|
||||
ProfileSelectorDialogViewModel viewModel = new()
|
||||
{
|
||||
Profiles = profiles,
|
||||
SelectedUserId = _parent.AccountManager.LastOpenedUser.UserId
|
||||
};
|
||||
(selected, _) = await UserSelectorDialog.ShowInputDialog(viewModel);
|
||||
(selected, _) = await ProfileSelectorDialog.ShowInputDialog(viewModel);
|
||||
|
||||
dialogCloseEvent.Set();
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
<UserControl
|
||||
x:Class="Ryujinx.Ava.UI.Applet.UserSelectorDialog"
|
||||
x:Class="Ryujinx.Ava.UI.Applet.ProfileSelectorDialog"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
@ -12,9 +12,9 @@
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
Focusable="True"
|
||||
x:DataType="viewModels:UserSelectorDialogViewModel">
|
||||
x:DataType="viewModels:ProfileSelectorDialogViewModel">
|
||||
<Design.DataContext>
|
||||
<viewModels:UserSelectorDialogViewModel />
|
||||
<viewModels:ProfileSelectorDialogViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
@ -16,15 +16,15 @@ using UserProfileSft = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
|
||||
|
||||
namespace Ryujinx.Ava.UI.Applet
|
||||
{
|
||||
public partial class UserSelectorDialog : UserControl, INotifyPropertyChanged
|
||||
public partial class ProfileSelectorDialog : UserControl
|
||||
{
|
||||
public UserSelectorDialogViewModel ViewModel { get; set; }
|
||||
public ProfileSelectorDialogViewModel ViewModel { get; set; }
|
||||
|
||||
public UserSelectorDialog(UserSelectorDialogViewModel viewModel)
|
||||
public ProfileSelectorDialog(ProfileSelectorDialogViewModel viewModel)
|
||||
{
|
||||
DataContext = ViewModel = viewModel;
|
||||
|
||||
InitializeComponent();
|
||||
ViewModel = viewModel;
|
||||
DataContext = ViewModel;
|
||||
}
|
||||
|
||||
private void Grid_PointerEntered(object sender, PointerEventArgs e)
|
||||
@ -54,7 +54,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
if (ViewModel.Profiles[selectedIndex] is UserProfile userProfile)
|
||||
{
|
||||
ViewModel.SelectedUserId = userProfile.UserId;
|
||||
Logger.Info?.Print(LogClass.UI, $"Selected user: {userProfile.UserId}");
|
||||
Logger.Info?.Print(LogClass.UI, $"Selected: {userProfile.UserId}", "ProfileSelector");
|
||||
|
||||
ObservableCollection<BaseModel> newProfiles = [];
|
||||
|
||||
@ -79,7 +79,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<(UserId Id, bool Result)> ShowInputDialog(UserSelectorDialogViewModel viewModel)
|
||||
public static async Task<(UserId Id, bool Result)> ShowInputDialog(ProfileSelectorDialogViewModel viewModel)
|
||||
{
|
||||
ContentDialog contentDialog = new()
|
||||
{
|
||||
@ -87,7 +87,7 @@ namespace Ryujinx.Ava.UI.Applet
|
||||
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.Continue],
|
||||
SecondaryButtonText = string.Empty,
|
||||
CloseButtonText = LocaleManager.Instance[LocaleKeys.Cancel],
|
||||
Content = new UserSelectorDialog(viewModel),
|
||||
Content = new ProfileSelectorDialog(viewModel),
|
||||
Padding = new Thickness(0)
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ using System.Collections.ObjectModel;
|
||||
|
||||
namespace Ryujinx.Ava.UI.ViewModels
|
||||
{
|
||||
public partial class UserSelectorDialogViewModel : BaseModel
|
||||
public partial class ProfileSelectorDialogViewModel : BaseModel
|
||||
{
|
||||
|
||||
[ObservableProperty] private UserId _selectedUserId;
|
Loading…
x
Reference in New Issue
Block a user