mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 03:19:56 +00:00
Profile editor - Added profile rename
Profile editor - Cleaned up buttons next to profile selection
This commit is contained in:
1 parent
3792dd53d2
commit
e61a031485
8 files changed
+174
-56
No files matched your search
@@ -182,6 +182,21 @@ namespace Artemis.UI.Screens.ProfileEditor
|
||||
RemoveProfile(SelectedProfile);
|
||||
}
|
||||
|
||||
public async Task RenameActiveProfile()
|
||||
{
|
||||
if (_profileEditorService.SelectedProfile == null)
|
||||
return;
|
||||
|
||||
Profile profile = _profileEditorService.SelectedProfile;
|
||||
object result = await DialogService.ShowDialog<ProfileEditViewModel>(new Dictionary<string, object> {{"profile", profile}});
|
||||
if (result is string name)
|
||||
{
|
||||
profile.Name = name;
|
||||
_profileEditorService.UpdateSelectedProfile();
|
||||
SelectedProfile.Update();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task ExportActiveProfile()
|
||||
{
|
||||
await DialogService.ShowDialog<ProfileExportViewModel>(new Dictionary<string, object>
|
||||
@@ -228,7 +243,7 @@ namespace Artemis.UI.Screens.ProfileEditor
|
||||
await Task.Delay(50);
|
||||
focusedElement?.Focus();
|
||||
});
|
||||
|
||||
|
||||
_snackbarMessageQueue.Enqueue("Undid profile update", "REDO", Redo);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user