diff --git a/asset/img/ellipsis.svg b/asset/img/ellipsis.svg
new file mode 100644
index 0000000..a074d29
--- /dev/null
+++ b/asset/img/ellipsis.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/kps_unifier.qrc b/kps_unifier.qrc
new file mode 100644
index 0000000..b43cb66
--- /dev/null
+++ b/kps_unifier.qrc
@@ -0,0 +1,7 @@
+
+
+ asset/img/ellipsis.svg
+ asset/img/eye.svg
+ asset/img/eye-off.svg
+
+
diff --git a/src/da_target_login.py b/src/da_target_login.py
new file mode 100644
index 0000000..04cdd43
--- /dev/null
+++ b/src/da_target_login.py
@@ -0,0 +1,75 @@
+# coding: utf8
+from PySide6 import QtWidgets, QtCore, QtGui
+
+
+class DaTargetLogin(QtWidgets.QDialog):
+ def __init__(self, parent=None):
+ super().__init__(parent)
+ self.setWindowTitle("目标文件")
+ self.vly_m = QtWidgets.QVBoxLayout()
+ self.setLayout(self.vly_m)
+
+ icon_ellipsis = QtGui.QIcon(":/asset/img/ellipsis.svg")
+ self.icon_eye = QtGui.QIcon(":/asset/img/eye.svg")
+ self.icon_eye_off = QtGui.QIcon(":/asset/img/eye-off.svg")
+
+ self.hly_path = QtWidgets.QHBoxLayout()
+ self.vly_m.addLayout(self.hly_path)
+ self.lb_path = QtWidgets.QLabel("路径:", self)
+ self.lne_path = QtWidgets.QLineEdit(self)
+ self.pbn_browse = QtWidgets.QPushButton(icon=icon_ellipsis, parent=self)
+ self.hly_path.addWidget(self.lb_path)
+ self.hly_path.addWidget(self.lne_path)
+ self.hly_path.addWidget(self.pbn_browse)
+
+ self.hly_password = QtWidgets.QHBoxLayout()
+ self.vly_m.addLayout(self.hly_password)
+ self.lb_password = QtWidgets.QLabel("密码:", self)
+ self.lne_password = QtWidgets.QLineEdit(self)
+ self.lne_password.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password)
+ self.pbn_eye = QtWidgets.QPushButton(icon=self.icon_eye_off, parent=self)
+ self.hly_password.addWidget(self.lb_password)
+ self.hly_password.addWidget(self.lne_password)
+ self.hly_password.addWidget(self.pbn_eye)
+
+ self.hly_bottom = QtWidgets.QHBoxLayout()
+ self.vly_m.addLayout(self.hly_bottom)
+ self.pbn_ok = QtWidgets.QPushButton("确定", self)
+ self.pbn_cancel = QtWidgets.QPushButton("取消", self)
+ self.hly_bottom.addStretch(1)
+ self.hly_bottom.addWidget(self.pbn_ok)
+ self.hly_bottom.addWidget(self.pbn_cancel)
+
+ self.vly_m.addStretch(1)
+
+ self.pbn_browse.clicked.connect(self.on_pbn_browse_clicked)
+ self.pbn_eye.clicked.connect(self.on_pbn_eye_clicked)
+ self.pbn_ok.clicked.connect(self.on_pbn_ok_clicked)
+ self.pbn_cancel.clicked.connect(self.on_pbn_cancel_clicked)
+
+ def on_pbn_browse_clicked(self):
+ filename, _ = QtWidgets.QFileDialog.getOpenFileName(self, "选择", "../",
+ filter="KeePass 2 数据库 (*.kdbx);;所有文件 (*)")
+ if len(filename) == 0:
+ return
+ self.lne_path.setText(filename)
+
+ def on_pbn_eye_clicked(self):
+ if self.lne_password.echoMode() == QtWidgets.QLineEdit.EchoMode.Password:
+ self.lne_password.setEchoMode(QtWidgets.QLineEdit.EchoMode.Normal)
+ self.pbn_eye.setIcon(self.icon_eye)
+ else:
+ self.lne_password.setEchoMode(QtWidgets.QLineEdit.EchoMode.Password)
+ self.pbn_eye.setIcon(self.icon_eye_off)
+
+ def sizeHint(self):
+ return QtCore.QSize(540, 40)
+
+ def on_pbn_ok_clicked(self):
+ self.accept()
+
+ def on_pbn_cancel_clicked(self):
+ self.reject()
+
+
+
diff --git a/src/kps_unifier.qrc b/src/kps_unifier.qrc
deleted file mode 100644
index 3939f56..0000000
--- a/src/kps_unifier.qrc
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
- asset/img/eye.svg
- asset/img/eye-off.svg
-
-
diff --git a/src/page_query.py b/src/page_query.py
index eb25c54..6223f76 100644
--- a/src/page_query.py
+++ b/src/page_query.py
@@ -5,6 +5,7 @@ from PySide6 import QtWidgets, QtCore, QtGui
from pykeepass import PyKeePass
from .da_entry_info import DaEntryInfo
+from .da_target_login import DaTargetLogin
from .utils import HorizontalLine, get_filepath_uuids_map, accept_warning
from lib.Sqlite3Helper import Sqlite3Worker, Expression, Operand
from lib.db_columns_def import (
@@ -269,7 +270,8 @@ class PageQuery(QtWidgets.QWidget):
f"共 {total} 条标记的条目,已删除 {success} 条,无效 {invalid} 条。")
def on_pbn_set_target_clicked(self):
- pass
+ da_target_login = DaTargetLogin(self)
+ da_target_login.exec()
class PushButtonWithData(QtWidgets.QPushButton):
diff --git a/src/rc_kps_unifier.py b/src/rc_kps_unifier.py
index 5d9f4e0..330f770 100644
--- a/src/rc_kps_unifier.py
+++ b/src/rc_kps_unifier.py
@@ -6,6 +6,34 @@
from PySide6 import QtCore
qt_resource_data = b"\
+\x00\x00\x01\x9a\
+<\
+svg xmlns=\x22http:\
+//www.w3.org/200\
+0/svg\x22 class=\x22io\
+nicon\x22 viewBox=\x22\
+0 0 512 512\x22>\
\x00\x00\x01\xf4\
<\
svg xmlns=\x22http:\
@@ -125,6 +153,10 @@ qt_resource_name = b"\
\x00\x00p7\
\x00i\
\x00m\x00g\
+\x00\x0c\
+\x07\x84:'\
+\x00e\
+\x00l\x00l\x00i\x00p\x00s\x00i\x00s\x00.\x00s\x00v\x00g\
\x00\x07\
\x0c\xf8Z\x07\
\x00e\
@@ -140,11 +172,13 @@ qt_resource_struct = b"\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
-\x00\x00\x00\x10\x00\x02\x00\x00\x00\x02\x00\x00\x00\x03\
+\x00\x00\x00\x10\x00\x02\x00\x00\x00\x03\x00\x00\x00\x03\
\x00\x00\x00\x00\x00\x00\x00\x00\
-\x00\x00\x000\x00\x00\x00\x00\x00\x01\x00\x00\x01\xf8\
+\x00\x00\x00N\x00\x00\x00\x00\x00\x01\x00\x00\x03\x96\
\x00\x00\x01\x90\xc8\xe4\x89P\
\x00\x00\x00\x1c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+\x00\x00\x01\x90\xce\x13\xe7\xfd\
+\x00\x00\x00:\x00\x00\x00\x00\x00\x01\x00\x00\x01\x9e\
\x00\x00\x01\x90\xc8\xe4\xa5\xc7\
"