1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-06-24 22:42:28 +00:00

Refactor gpg for more clean job handling

This commit is contained in:
2025-01-15 23:15:00 +01:00
parent 00116aea8c
commit e589abd10c
11 changed files with 381 additions and 242 deletions

View File

@ -49,11 +49,11 @@ Page {
iconName: "back"
text: "Back"
onTriggered: {
// passwordPage.plainText = "";
// for (var object in objects) {
// object.text = "";
// object.destroy();
// }
passwordPage.plainText = null;
for (var object in objects) {
object.text = null;
object.destroy();
}
pageStack.pop();
}
}

View File

@ -1,9 +1,11 @@
import "headers"
import "../components"
import "../dialogs"
import Lomiri.Components 1.3
import Pass 1.0
import Qt.labs.folderlistmodel 2.1
import QtQuick 2.4
import "headers"
import Lomiri.Components.Popups 1.3
Page {
id: passwordListPage
@ -13,13 +15,13 @@ Page {
anchors.fill: parent
Component.onCompleted: {
passwordStorePath = "file:" + Pass.password_store;
Pass.onDecrypted.connect(function(filename, text) {
Pass.onShowSucceed.connect(function(filename, text) {
pageStack.push(Qt.resolvedUrl("../pages/Password.qml"), {
"plainText": text,
"title": filename
});
});
Pass.onDecryptFailed.connect(function() {
Pass.onShowFailed.connect(function(message) {
PopupUtils.open(passwordPageDecryptError);
});
}
@ -87,4 +89,13 @@ Page {
]
}
Component {
id: passwordPageDecryptError
ErrorDialog {
textError: i18n.tr("Decryption failed !")
}
}
}