Add the player select applet. #537

Merged
Jacobwasbeast merged 10 commits from feature-playerSelect into master 2025-01-19 02:40:33 +00:00
3 changed files with 9 additions and 8 deletions
Showing only changes of commit afed4a3ec0 - Show all commits

View File

@ -27,6 +27,7 @@ using static SDL2.SDL;
using AntiAliasing = Ryujinx.Common.Configuration.AntiAliasing; using AntiAliasing = Ryujinx.Common.Configuration.AntiAliasing;
using ScalingFilter = Ryujinx.Common.Configuration.ScalingFilter; using ScalingFilter = Ryujinx.Common.Configuration.ScalingFilter;
using Switch = Ryujinx.HLE.Switch; using Switch = Ryujinx.HLE.Switch;
using UserProfile = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
namespace Ryujinx.Headless namespace Ryujinx.Headless
{ {

View File

@ -270,16 +270,16 @@ namespace Ryujinx.Ava.UI.Applet
Dispatcher.UIThread.InvokeAsync(async () => Dispatcher.UIThread.InvokeAsync(async () =>
{ {
var Profiles = new ObservableCollection<BaseModel>(); ObservableCollection<BaseModel> profiles = [];
var nav = new NavigationDialogHost(); NavigationDialogHost nav = new();
_parent.AccountManager.GetAllUsers() _parent.AccountManager.GetAllUsers()
.OrderBy(x => x.Name) .OrderBy(x => x.Name)
.ForEach(profile => Profiles.Add(new Models.UserProfile(profile, nav))); .ForEach(profile => profiles.Add(new Models.UserProfile(profile, nav)));
Profiles.Add(new Models.UserProfile(guest, nav)); profiles.Add(new Models.UserProfile(guest, nav));
var content = new UserSelectorDialog(Profiles); UserSelectorDialog content = new(profiles);
(UserId id, _) = await UserSelectorDialog.ShowInputDialog(content, _parent.AccountManager.LastOpenedUser); (UserId id, _) = await UserSelectorDialog.ShowInputDialog(content, _parent.AccountManager.LastOpenedUser);
selected = id; selected = id;

View File

@ -65,7 +65,7 @@ namespace Ryujinx.Ava.UI.Applet
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{ {
_selectedUserId = userProfile.UserId; _selectedUserId = userProfile.UserId;
Logger.Info?.Print(LogClass.UI, $"Selected user: {userProfile.UserId}"); Logger.Info?.Print(LogClass.UI, $"Selected user: {userProfile.UserId}");
var NewProfiles = new ObservableCollection<BaseModel>(); ObservableCollection<BaseModel> newProfiles = [];
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
foreach (var item in Profiles) foreach (var item in Profiles)
{ {
@ -76,10 +76,10 @@ namespace Ryujinx.Ava.UI.Applet
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
{ {
profile.AccountState = AccountState.Open; profile.AccountState = AccountState.Open;
} }
NewProfiles.Add(new UserProfile(profile, new NavigationDialogHost())); newProfiles.Add(new UserProfile(profile, new NavigationDialogHost()));
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
} }
Profiles = NewProfiles; Profiles = newProfiles;
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
OnPropertyChanged(nameof(Profiles)); OnPropertyChanged(nameof(Profiles));
} }
} }

GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:21:52 +00:00 (Migrated from github.com)
Review

sender is Grid { DataContext: UserProfile profile }

`sender is Grid { DataContext: UserProfile profile }`
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:22:00 +00:00 (Migrated from github.com)
Review

Identical to above

Identical to above
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`
GreemDev commented 2025-01-19 00:23:14 +00:00 (Migrated from github.com)
Review

The value names in tuples should be PascalCase; Task<(UserId Id, bool Result)>

The value names in tuples should be PascalCase; `Task<(UserId Id, bool Result)>`