mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-04-24 08:26:28 +03:00
Add button to save passwords
This commit is contained in:
@@ -10,4 +10,9 @@ public class UnlockedRepositoryViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
passStore = store;
|
passStore = store;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Save()
|
||||||
|
{
|
||||||
|
passStore.Save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -44,6 +44,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
<!-- Save Passwords -->
|
<!-- Save Passwords -->
|
||||||
<Button Content="Save Passwords"
|
<Button Content="Save Passwords"
|
||||||
|
Click="SaveButton_Click"
|
||||||
Height="30"
|
Height="30"
|
||||||
Foreground="White"
|
Foreground="White"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
using KeyKeeper.ViewModels;
|
using KeyKeeper.ViewModels;
|
||||||
|
|
||||||
namespace KeyKeeper.Views;
|
namespace KeyKeeper.Views;
|
||||||
@@ -20,4 +21,12 @@ public partial class RepositoryWindow: Window
|
|||||||
{
|
{
|
||||||
base.OnOpened(e);
|
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