mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-07-02 17:00:47 -07:00
Avalonia - Save Manager (#3476)
* Add save manager to account selector * add fallback to app metadata for titlename if app is not in gamelist * Allow recovering lost accounts
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
using Ryujinx.Ava.Ui.Controls;
|
||||
using Ryujinx.Ava.Ui.ViewModels;
|
||||
using Ryujinx.HLE.HOS.Services.Account.Acc;
|
||||
using Profile = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
|
||||
@ -7,6 +8,7 @@ namespace Ryujinx.Ava.Ui.Models
|
||||
public class UserProfile : BaseModel
|
||||
{
|
||||
private readonly Profile _profile;
|
||||
private readonly NavigationDialogHost _owner;
|
||||
private byte[] _image;
|
||||
private string _name;
|
||||
private UserId _userId;
|
||||
@ -41,9 +43,10 @@ namespace Ryujinx.Ava.Ui.Models
|
||||
}
|
||||
}
|
||||
|
||||
public UserProfile(Profile profile)
|
||||
public UserProfile(Profile profile, NavigationDialogHost owner)
|
||||
{
|
||||
_profile = profile;
|
||||
_owner = owner;
|
||||
|
||||
Image = profile.Image;
|
||||
Name = profile.Name;
|
||||
@ -57,5 +60,10 @@ namespace Ryujinx.Ava.Ui.Models
|
||||
OnPropertyChanged(nameof(IsOpened));
|
||||
OnPropertyChanged(nameof(Name));
|
||||
}
|
||||
|
||||
public void Recover(UserProfile userProfile)
|
||||
{
|
||||
_owner.Navigate(typeof(UserEditor), (_owner, userProfile, true));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user