1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-07-09 05:12:29 +00:00

Some improvements

This commit is contained in:
2025-03-12 15:34:33 +01:00
parent 884488b9ed
commit bdb2d58ac4
14 changed files with 117 additions and 37 deletions

View File

@ -142,7 +142,7 @@ Column {
color: theme.palette.normal.positive
text: i18n.tr('Clone')
onClicked: {
Git.cloneSSHKey(repoUrlInput.text, Pass.Passphrase_store, repoPassphraseInput.text);
Git.cloneSshKey(repoUrlInput.text, Pass.password_store, repoPassphraseInput.text);
}
}

View File

@ -6,11 +6,12 @@ Dialog {
id: dialog
property string textError
property string textErrorDescription : null
signal dialogClosed()
title: i18n.tr("Error !")
text: textError
text: textErrorDescription ? (textError + "<br>" + textErrorDescription) : textError
Button {
text: i18n.tr("Close")

View File

@ -12,6 +12,7 @@ Page {
property string __passwordStorePath
property var __passwords
property string __text_error_description: null
function __searchPasswords(filter) {
var ret = [];
@ -48,7 +49,25 @@ Page {
"title": filename
});
});
Pass.onShowFailed.connect(function(message) {
Pass.onShowFailed.connect(function(code, message) {
switch (code) {
case 1: // UnexceptedError -> use the default (not translate) rnp error
__text_error_description = message;
break;
case 2: // BadPassphrase
__text_error_description = i18n.tr("Bad passphrase");
break;
case 3: // NoKeyFound
__text_error_description = i18n.tr("No valid key found");
break;
case 3: // DecryptFailed
__text_error_description = i18n.tr("Decryption failed");
break;
default:
console.warn("Unhandled error code");
__text_error_description = message;
break;
}
PopupUtils.open(passwordPageDecryptError);
});
Pass.onLsSucceed.connect(function(passwords) {
@ -174,10 +193,12 @@ Page {
ErrorDialog {
textError: i18n.tr("Decryption failed !")
textErrorDescription: __text_error_description
}
}
Timer {
id: searchTimer