|
|
|
@ -8,6 +8,7 @@ from typing import Union
|
|
|
|
|
|
|
|
|
|
import wx
|
|
|
|
|
import wx.lib.scrolledpanel as scrolled
|
|
|
|
|
import wx.lib.dialogs as dialogs
|
|
|
|
|
import gnupg
|
|
|
|
|
|
|
|
|
|
from pass_handler import Pass, copy_to_clipboard, get_password_from_path, pass_pull, pass_push, run_command
|
|
|
|
@ -104,15 +105,18 @@ class PassUi(wx.Frame):
|
|
|
|
|
self.sizer.Add(gpg_btn, 0, wx.EXPAND) # pylint: disable=no-member
|
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
|
lambda event: self.gpg_button_clicked(), gpg_btn)
|
|
|
|
|
if self.gpg_key:
|
|
|
|
|
init_btn: wx.Button = wx.Button(self.pnl, label="Init Local Password Store")
|
|
|
|
|
git_btn: wx.Button = wx.Button(self.pnl, label="Clone Remote Password Store From Git")
|
|
|
|
|
self.sizer.Add(init_btn, 0, wx.EXPAND) # pylint: disable=no-member
|
|
|
|
|
self.sizer.Add(git_btn, 0, wx.EXPAND) # pylint: disable=no-member
|
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
|
lambda event: self.git_button_clicked(), git_btn)
|
|
|
|
|
if self.gpg_key:
|
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
|
lambda event: self.init_button_clicked(), init_btn)
|
|
|
|
|
else:
|
|
|
|
|
self.Bind(wx.EVT_BUTTON,
|
|
|
|
|
lambda event: dialogs.alertDialog(message='You must select a GPG key'), init_btn)
|
|
|
|
|
|
|
|
|
|
def add_push_pull(self):
|
|
|
|
|
"""add_push_pull."""
|
|
|
|
|