mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-04-17 18:16:28 +03:00
Add button to save passwords
This commit is contained in:
@@ -10,4 +10,9 @@ public class UnlockedRepositoryViewModel : ViewModelBase
|
||||
{
|
||||
passStore = store;
|
||||
}
|
||||
|
||||
public void Save()
|
||||
{
|
||||
passStore.Save();
|
||||
}
|
||||
}
|
||||
@@ -44,6 +44,7 @@
|
||||
</Border>
|
||||
<!-- Save Passwords -->
|
||||
<Button Content="Save Passwords"
|
||||
Click="SaveButton_Click"
|
||||
Height="30"
|
||||
Foreground="White"
|
||||
HorizontalAlignment="Left"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using KeyKeeper.ViewModels;
|
||||
|
||||
namespace KeyKeeper.Views;
|
||||
@@ -20,4 +21,12 @@ public partial class RepositoryWindow: Window
|
||||
{
|
||||
base.OnOpened(e);
|
||||
}
|
||||
|
||||
private void SaveButton_Click(object sender, RoutedEventArgs args)
|
||||
{
|
||||
if (DataContext is RepositoryWindowViewModel vm && vm.CurrentPage is UnlockedRepositoryViewModel pageVm)
|
||||
{
|
||||
pageVm.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user