diff --git a/src/KeyKeeper/Views/RepositoryWindow.axaml b/src/KeyKeeper/Views/RepositoryWindow.axaml index 5931901..332b4cf 100644 --- a/src/KeyKeeper/Views/RepositoryWindow.axaml +++ b/src/KeyKeeper/Views/RepositoryWindow.axaml @@ -82,6 +82,13 @@ Foreground="#666" HorizontalAlignment="Center" /> + + + + + + + diff --git a/src/KeyKeeper/Views/RepositoryWindow.axaml.cs b/src/KeyKeeper/Views/RepositoryWindow.axaml.cs index 65da515..380c84f 100644 --- a/src/KeyKeeper/Views/RepositoryWindow.axaml.cs +++ b/src/KeyKeeper/Views/RepositoryWindow.axaml.cs @@ -1,5 +1,4 @@ using System; -using System.Threading.Tasks; using Avalonia; using Avalonia.Controls; using Avalonia.Interactivity; @@ -54,4 +53,25 @@ public partial class RepositoryWindow: Window Clipboard!.SetTextAsync(pwd.Password.Value); } } + + private void EntryContextMenuItem_Click(object sender, RoutedEventArgs args) { + if (args.Source is StyledElement s) + { + if (s.DataContext is PassStoreEntryPassword pwd) + { + if (s.Name == "entryCtxMenuCopyUsername") + { + Clipboard!.SetTextAsync(pwd.Username.Value); + } + else if (s.Name == "entryCtxMenuCopyPassword") + { + Clipboard!.SetTextAsync(pwd.Password.Value); + } + else if (s.Name == "entryCtxMenuDelete") + { + Console.WriteLine("DELETE"); + } + } + } + } } \ No newline at end of file