diff --git a/clickable.yaml b/clickable.yaml index 4c3d522..5cb119b 100644 --- a/clickable.yaml +++ b/clickable.yaml @@ -6,7 +6,7 @@ scripts: style: >- echo 'Running Astyle :' && astyle --options=.astylerc --recursive '*.cpp,*.h' --exclude=build && echo 'Running QmlFormat' && find . -name "*.qml" -exec qmlformat -i {} \; && echo 'Success' - +skip_review: true dependencies_target: @@ -14,7 +14,10 @@ dependencies_target: - libgpgme-dev - libgit2-dev - libquazip5-dev +- gpg-agent +- gpgconf - gpg +- fakechroot:all install_lib: - "libgpg-error.so.0.28.0" @@ -31,4 +34,6 @@ install_lib: - "libssh2.so*" install_bin: +- "fakechroot" +- "gpg-agent" - "gpg" diff --git a/po/utpass.qrouland.pot b/po/utpass.qrouland.pot index 395fc99..d4f56a9 100644 --- a/po/utpass.qrouland.pot +++ b/po/utpass.qrouland.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: utpass.qrouland\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-01-20 15:56+0100\n" +"POT-Creation-Date: 2025-01-28 09:40+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,12 +38,12 @@ msgid "passphrase" msgstr "" #: ../qml/dialogs/PassphraseDialog.qml:29 -#: ../qml/dialogs/SimpleValidationDialog.qml:9 +#: ../qml/dialogs/SimpleValidationDialog.qml:8 msgid "Ok" msgstr "" #: ../qml/dialogs/PassphraseDialog.qml:41 -#: ../qml/dialogs/SimpleValidationDialog.qml:34 +#: ../qml/dialogs/SimpleValidationDialog.qml:29 msgid "Cancel" msgstr "" @@ -79,27 +79,27 @@ msgstr "" msgid "Info" msgstr "" -#: ../qml/pages/PasswordList.qml:44 +#: ../qml/pages/PasswordList.qml:45 msgid "No password found" msgstr "" -#: ../qml/pages/PasswordList.qml:55 +#: ../qml/pages/PasswordList.qml:58 msgid "You can import a password store by cloning or" msgstr "" -#: ../qml/pages/PasswordList.qml:61 +#: ../qml/pages/PasswordList.qml:65 msgid "importing a password store zip in the settings" msgstr "" -#: ../qml/pages/PasswordList.qml:95 +#: ../qml/pages/PasswordList.qml:100 msgid "Decryption failed !" msgstr "" -#: ../qml/pages/PasswordList.qml:109 +#: ../qml/pages/PasswordList.qml:114 msgid "Back" msgstr "" -#: ../qml/pages/PasswordList.qml:116 ../qml/pages/headers/MainHeader.qml:9 +#: ../qml/pages/PasswordList.qml:121 ../qml/pages/headers/MainHeader.qml:9 #: ../qml/pages/headers/StackHeader.qml:9 UTPass.desktop.in.h:1 msgid "UTPass" msgstr "" @@ -112,90 +112,94 @@ msgstr "" msgid "Search" msgstr "" -#: ../qml/pages/settings/DeleteRepo.qml:41 +#: ../qml/pages/settings/DeleteRepo.qml:43 #: ../qml/pages/settings/Settings.qml:58 msgid "Delete Password Store" msgstr "" -#: ../qml/pages/settings/DeleteRepo.qml:54 +#: ../qml/pages/settings/DeleteRepo.qml:56 msgid "You're are about to delete
the current Password Store.
Continue ?" msgstr "" -#: ../qml/pages/settings/DeleteRepo.qml:55 -#: ../qml/pages/settings/ImportZip.qml:66 -#: ../qml/pages/settings/InfoKeys.qml:140 -#: ../qml/pages/settings/git/ImportGitClone.qml:55 +#: ../qml/pages/settings/DeleteRepo.qml:57 +#: ../qml/pages/settings/ImportZip.qml:64 +#: ../qml/pages/settings/InfoKeys.qml:170 +#: ../qml/pages/settings/git/ImportGitClone.qml:56 msgid "Yes" msgstr "" -#: ../qml/pages/settings/DeleteRepo.qml:68 +#: ../qml/pages/settings/DeleteRepo.qml:70 msgid "Password Store removal failed !" msgstr "" -#: ../qml/pages/settings/DeleteRepo.qml:77 +#: ../qml/pages/settings/DeleteRepo.qml:79 msgid "Password Store deleted !" msgstr "" -#: ../qml/pages/settings/DeleteRepo.qml:89 -#: ../qml/pages/settings/InfoKeys.qml:182 +#: ../qml/pages/settings/DeleteRepo.qml:91 +#: ../qml/pages/settings/InfoKeys.qml:212 msgid "Info Keys" msgstr "" -#: ../qml/pages/settings/ImportKeyFile.qml:57 +#: ../qml/pages/settings/ImportKeyFile.qml:59 msgid "Key import failed !" msgstr "" -#: ../qml/pages/settings/ImportKeyFile.qml:66 +#: ../qml/pages/settings/ImportKeyFile.qml:68 msgid "Key successfully imported !" msgstr "" -#: ../qml/pages/settings/ImportKeyFile.qml:77 +#: ../qml/pages/settings/ImportKeyFile.qml:79 msgid "GPG Key Import" msgstr "" -#: ../qml/pages/settings/ImportZip.qml:65 +#: ../qml/pages/settings/ImportZip.qml:63 msgid "" "Importing a new zip will delete
any existing password store!
Continue ?" msgstr "" -#: ../qml/pages/settings/ImportZip.qml:79 +#: ../qml/pages/settings/ImportZip.qml:77 msgid "Password store import failed !" msgstr "" -#: ../qml/pages/settings/ImportZip.qml:88 -#: ../qml/pages/settings/git/ImportGitClone.qml:77 +#: ../qml/pages/settings/ImportZip.qml:86 +#: ../qml/pages/settings/git/ImportGitClone.qml:78 msgid "Password store sucessfully imported !" msgstr "" -#: ../qml/pages/settings/ImportZip.qml:100 +#: ../qml/pages/settings/ImportZip.qml:98 msgid "Zip Password Store Import" msgstr "" -#: ../qml/pages/settings/InfoKeys.qml:56 +#: ../qml/pages/settings/InfoKeys.qml:49 +msgid "No key found" +msgstr "" + +#: ../qml/pages/settings/InfoKeys.qml:85 msgid "Key ID :" msgstr "" -#: ../qml/pages/settings/InfoKeys.qml:90 +#: ../qml/pages/settings/InfoKeys.qml:120 msgid "Users IDs : " msgstr "" -#: ../qml/pages/settings/InfoKeys.qml:117 +#: ../qml/pages/settings/InfoKeys.qml:147 msgid "Delete this key" msgstr "" -#: ../qml/pages/settings/InfoKeys.qml:139 +#: ../qml/pages/settings/InfoKeys.qml:169 msgid "You're are about to delete
%1.
Continue ?" msgstr "" -#: ../qml/pages/settings/InfoKeys.qml:153 +#: ../qml/pages/settings/InfoKeys.qml:183 msgid "Key removal failed !" msgstr "" -#: ../qml/pages/settings/InfoKeys.qml:162 +#: ../qml/pages/settings/InfoKeys.qml:192 msgid "Key successfully deleted !" msgstr "" -#: ../qml/pages/settings/InfoKeys.qml:174 +#: ../qml/pages/settings/InfoKeys.qml:204 msgid "An Error occured getting GPG keys !" msgstr "" @@ -232,25 +236,26 @@ msgstr "" msgid "Repo Url" msgstr "" -#: ../qml/pages/settings/git/GitCloneHttp.qml:32 -#: ../qml/pages/settings/git/GitCloneHttpAuth.qml:50 +#: ../qml/pages/settings/git/GitCloneHttp.qml:40 +#: ../qml/pages/settings/git/GitCloneHttpAuth.qml:60 msgid "Clone" msgstr "" -#: ../qml/pages/settings/git/GitCloneHttpAuth.qml:33 +#: ../qml/pages/settings/git/GitCloneHttpAuth.qml:35 +#: ../qml/pages/settings/git/GitCloneHttpAuth.qml:46 msgid "Password" msgstr "" -#: ../qml/pages/settings/git/ImportGitClone.qml:54 +#: ../qml/pages/settings/git/ImportGitClone.qml:55 msgid "" "Importing a git repo will delete
any existing password store!" "
Continue ?" msgstr "" -#: ../qml/pages/settings/git/ImportGitClone.qml:68 +#: ../qml/pages/settings/git/ImportGitClone.qml:69 msgid "An error occured during git clone !" msgstr "" -#: ../qml/pages/settings/git/ImportGitClone.qml:89 +#: ../qml/pages/settings/git/ImportGitClone.qml:90 msgid "Git Clone Import" msgstr "" diff --git a/qml/Main.qml b/qml/Main.qml index 4b9da5c..8ff6d36 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -21,12 +21,17 @@ MainView { pop.activateFocus(); } + objectName: "mainView" applicationName: "utpass.qrouland" automaticOrientation: true width: units.gu(45) height: units.gu(75) + Component.onCompleted: { + myWorker.sendMessage("Hello World !") + } + PageStack { id: pageStack diff --git a/qml/dialogs/SimpleValidationDialog.qml b/qml/dialogs/SimpleValidationDialog.qml index fd87bc6..086835c 100644 --- a/qml/dialogs/SimpleValidationDialog.qml +++ b/qml/dialogs/SimpleValidationDialog.qml @@ -5,17 +5,12 @@ import QtQuick 2.4 Dialog { id: dialog - property string text property string continueText: i18n.tr("Ok") property color continueColor: theme.palette.normal.positive signal validated() signal canceled() - Text { - horizontalAlignment: Text.AlignHCenter - text: dialog.text - } Button { id: continueButton diff --git a/qml/pages/PasswordList.qml b/qml/pages/PasswordList.qml index bc0e1d2..3dcc596 100644 --- a/qml/pages/PasswordList.qml +++ b/qml/pages/PasswordList.qml @@ -38,29 +38,34 @@ Page { Rectangle { width: parent.width height: units.gu(1) + color: theme.palette.normal.background } Text { text: i18n.tr("No password found") width: parent.width horizontalAlignment: Text.AlignHCenter + color: theme.palette.normal.backgroundText } Rectangle { width: parent.width height: units.gu(1) + color: theme.palette.normal.background } Text { text: i18n.tr("You can import a password store by cloning or") width: parent.width horizontalAlignment: Text.AlignHCenter + color: theme.palette.normal.backgroundText } Text { text: i18n.tr("importing a password store zip in the settings") width: parent.width horizontalAlignment: Text.AlignHCenter + color: theme.palette.normal.backgroundText } } diff --git a/qml/pages/settings/DeleteRepo.qml b/qml/pages/settings/DeleteRepo.qml index 3b9855a..fc30fa0 100644 --- a/qml/pages/settings/DeleteRepo.qml +++ b/qml/pages/settings/DeleteRepo.qml @@ -29,9 +29,11 @@ Page { anchors.rightMargin: units.gu(2) spacing: units.gu(1) + Rectangle { width: parent.width height: units.gu(1) + color: theme.palette.normal.background } Button { diff --git a/qml/pages/settings/ImportKeyFile.qml b/qml/pages/settings/ImportKeyFile.qml index 1416d96..d4d8b7b 100644 --- a/qml/pages/settings/ImportKeyFile.qml +++ b/qml/pages/settings/ImportKeyFile.qml @@ -29,12 +29,14 @@ Page { console.log("Charged"); console.log(importKeyFilePage.activeTransfer.items[0].url); var status = Pass.importGPGKey(importKeyFilePage.activeTransfer.items[0].url); - Utils.rmFile(importKeyFilePage.activeTransfer.items[0].url); - if (status) + Pass.importGPGKeySucceed.connect(function() { + importKeyFilePage.activeTransfer = null; PopupUtils.open(dialogImportKeyPageSucess); - else + }); + Pass.importGPGKeyFailed.connect(function(message) { + importKeyFilePage.activeTransfer = null; PopupUtils.open(dialogImportKeyPageError); - importKeyFilePage.activeTransfer = null; + }); } }); } diff --git a/qml/pages/settings/ImportZip.qml b/qml/pages/settings/ImportZip.qml index b079b75..7de1b90 100644 --- a/qml/pages/settings/ImportZip.qml +++ b/qml/pages/settings/ImportZip.qml @@ -13,16 +13,6 @@ Page { property var activeTransfer Component.onCompleted: { - Utils.unzipSucceed.connect(function() { - PopupUtils.open(dialogImportZipPageSuccess); - // Utils.rmFile(importZipPage.activeTransfer.items[0].url); - importZipPage.activeTransfer = null; - }); - Utils.unzipFailed.connect(function(message) { - PopupUtils.open(dialogImportZipPageError); - // Utils.rmFile(importZipPage.activeTransfer.items[0].url); - importZipPage.activeTransfer = null; - }); PopupUtils.open(importZipPageImportValidation, importZipPage); } @@ -43,6 +33,14 @@ Page { console.log("Charged"); console.log(importZipPage.activeTransfer.items[0].url); var status = Utils.unzip(importZipPage.activeTransfer.items[0].url, Pass.getPasswordStore()); + Utils.unzipSucceed.connect(function() { + importZipPage.activeTransfer = null; + PopupUtils.open(dialogImportZipPageSuccess); + }); + Utils.unzipFailed.connect(function(message) { + importZipPage.activeTransfer = null; + PopupUtils.open(dialogImportZipPageError); + }); } }); } diff --git a/qml/pages/settings/InfoKeys.qml b/qml/pages/settings/InfoKeys.qml index 8b20180..d598909 100644 --- a/qml/pages/settings/InfoKeys.qml +++ b/qml/pages/settings/InfoKeys.qml @@ -8,12 +8,15 @@ import QtQuick 2.4 Page { id: infoKeysPage - - property QtObject currentKey + property list __keys + property QtObject __currentKey Component.onCompleted: { Pass.getAllGPGKeysSucceed.connect(function(keys_info) { - infoKeysListView.model = keys_info; + infoKeysPage.__keys = keys_info; + for (var i = 0; i < keys_info.length; ++i) { + console.debug("is secret " + keys_info[i].isSecret) + } }); Pass.getAllGPGKeysFailed.connect(function(message) { PopupUtils.open(infoKeysPageGetAllError); @@ -27,6 +30,30 @@ Page { Pass.getAllGPGKeys(); } + Column { + anchors.top: infoKeysHeader.bottom + anchors.bottom: parent.bottom + anchors.right: parent.right + anchors.left: parent.left + anchors.leftMargin: units.gu(2) + anchors.rightMargin: units.gu(2) + visible: infoKeysPage.__keys.length === 0 + + Rectangle { + width: parent.width + height: units.gu(1) + color: theme.palette.normal.background + } + + Text { + text: i18n.tr("No key found") + width: parent.width + horizontalAlignment: Text.AlignHCenter + color: theme.palette.normal.backgroundText + } + + } + ListView { id: infoKeysListView @@ -36,6 +63,8 @@ Page { anchors.left: parent.left anchors.leftMargin: units.gu(2) anchors.rightMargin: units.gu(2) + visible: infoKeysPage.__keys.length !== 0 + model: infoKeysPage.__keys delegate: Grid { columns: 1 @@ -79,6 +108,7 @@ Page { userIdsModel.append({ "model": model.modelData.userIds[i] }); + } } } @@ -117,7 +147,7 @@ Page { text: i18n.tr("Delete this key") color: theme.palette.normal.negative onClicked: { - infoKeysPage.currentKey = model.modelData; + infoKeysPage.__currentKey = model.modelData; PopupUtils.open(infoKeysPageDeleteValidation, infoKeysPage); } } @@ -136,11 +166,11 @@ Page { id: infoKeysPageDeleteValidation SimpleValidationDialog { - text: i18n.tr("You're are about to delete
%1.
Continue ?").arg(infoKeysPage.currentKey.uid) + text: i18n.tr("You're are about to delete
%1.
Continue ?").arg(infoKeysPage.__currentKey.uid) continueText: i18n.tr("Yes") continueColor: theme.palette.normal.negative onValidated: { - var status = Pass.deleteGPGKey(infoKeysPage.currentKey); + var status = Pass.deleteGPGKey(infoKeysPage.__currentKey); } } diff --git a/qml/pages/settings/Settings.qml b/qml/pages/settings/Settings.qml index bbdba01..37d192b 100644 --- a/qml/pages/settings/Settings.qml +++ b/qml/pages/settings/Settings.qml @@ -63,7 +63,7 @@ Page { verticalAlignment: Text.AlignVCenter width: parent.width height: units.gu(4) - color: LomiriColors.red + color: theme.palette.normal.negative text: i18n.tr('Warning: importing delete any exiting Password Store') } diff --git a/qml/pages/settings/git/GitCloneHttp.qml b/qml/pages/settings/git/GitCloneHttp.qml index 813e7b1..c22884e 100644 --- a/qml/pages/settings/git/GitCloneHttp.qml +++ b/qml/pages/settings/git/GitCloneHttp.qml @@ -14,6 +14,7 @@ Column { verticalAlignment: Text.AlignVCenter width: parent.width text: i18n.tr('Repo Url') + color: theme.palette.normal.backgroundText } TextField { @@ -22,6 +23,13 @@ Column { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter width: parent.width + placeholderText: "http(s)://" + } + + Rectangle { + width: parent.width + height: units.gu(1) + color: theme.palette.normal.background } Button { diff --git a/qml/pages/settings/git/GitCloneHttpAuth.qml b/qml/pages/settings/git/GitCloneHttpAuth.qml index f307d69..8a52585 100644 --- a/qml/pages/settings/git/GitCloneHttpAuth.qml +++ b/qml/pages/settings/git/GitCloneHttpAuth.qml @@ -14,6 +14,7 @@ Column { verticalAlignment: Text.AlignVCenter width: parent.width text: i18n.tr('Repo Url') + color: theme.palette.normal.backgroundText } TextField { @@ -22,6 +23,7 @@ Column { horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter width: parent.width + placeholderText: "http(s)://@" } Text { @@ -31,6 +33,7 @@ Column { verticalAlignment: Text.AlignVCenter width: parent.width text: i18n.tr('Password') + color: theme.palette.normal.backgroundText } TextField { @@ -40,6 +43,13 @@ Column { verticalAlignment: Text.AlignVCenter width: parent.width echoMode: TextInput.Password + placeholderText: i18n.tr('Password') + } + + Rectangle { + width: parent.width + height: units.gu(1) + color: theme.palette.normal.background } Button { diff --git a/qml/pages/settings/git/ImportGitClone.qml b/qml/pages/settings/git/ImportGitClone.qml index 3999ceb..e36abca 100644 --- a/qml/pages/settings/git/ImportGitClone.qml +++ b/qml/pages/settings/git/ImportGitClone.qml @@ -33,6 +33,7 @@ Page { Rectangle { width: parent.width height: units.gu(1) + color: theme.palette.normal.background } GitModeOptionSelector {