1
0
mirror of https://github.com/QRouland/UTPass.git synced 2026-01-10 19:36:57 +00:00

Foramtting

This commit is contained in:
2026-01-06 15:42:10 +01:00
parent 083750f429
commit fbfd276b00
15 changed files with 185 additions and 186 deletions

View File

@@ -1,10 +1,9 @@
import "../../components"
import Utils 1.0
import Git 1.0
import Lomiri.Components 1.3
import Lomiri.Components.Popups 1.3
import Lomiri.Content 1.3
import Utils 1.0
ImportFile {
id: importSSHKeyPage
@@ -12,27 +11,25 @@ ImportFile {
property bool isPrivateKey
headerTitle: i18n.tr("SSH Key Import")
dialogSuccessTxt : i18n.tr("SSH Key successfully imported !")
dialogErrorTxt : i18n.tr("SSH Key import failed !")
dialogSuccessTxt: i18n.tr("SSH Key successfully imported !")
dialogErrorTxt: i18n.tr("SSH Key import failed !")
contentPicker.onPeerSelected: {
{
importSSHKeyPage.contentPicker.peer.selectionType = ContentTransfer.Single;
importSSHKeyPage.activeTransfer = importSSHKeyPage.contentPicker.peer.request();
importSSHKeyPage.activeTransfer.stateChanged.connect(function() {
if (importSSHKeyPage.activeTransfer.state === ContentTransfer.Charged) {
console.log("Charged");
console.log(importSSHKeyPage.activeTransfer.items[0].url);
var ret = Git.importSshKey(importSSHKeyPage.activeTransfer.items[0].url, isPrivateKey);
Utils.rmFile(importSSHKeyPage.activeTransfer.items[0].url);
importSSHKeyPage.activeTransfer = null;
if(ret) {
PopupUtils.open(importSSHKeyPage.dialogImportKeyPageSucess);
} else {
PopupUtils.open(importSSHKeyPage.dialogImportKeyPageError);
}
}
});
}
{
importSSHKeyPage.contentPicker.peer.selectionType = ContentTransfer.Single;
importSSHKeyPage.activeTransfer = importSSHKeyPage.contentPicker.peer.request();
importSSHKeyPage.activeTransfer.stateChanged.connect(function() {
if (importSSHKeyPage.activeTransfer.state === ContentTransfer.Charged) {
console.log("Charged");
console.log(importSSHKeyPage.activeTransfer.items[0].url);
var ret = Git.importSshKey(importSSHKeyPage.activeTransfer.items[0].url, isPrivateKey);
Utils.rmFile(importSSHKeyPage.activeTransfer.items[0].url);
importSSHKeyPage.activeTransfer = null;
if (ret)
PopupUtils.open(importSSHKeyPage.dialogImportKeyPageSucess);
else
PopupUtils.open(importSSHKeyPage.dialogImportKeyPageError);
}
});
};
}
}