2022-08-16 09:19:15 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var keycardModule
|
|
|
|
|
2022-08-31 17:09:07 +00:00
|
|
|
function runSetupKeycardPopup() {
|
|
|
|
root.keycardModule.runSetupKeycardPopup()
|
|
|
|
}
|
2022-09-20 14:05:02 +00:00
|
|
|
|
2022-09-21 13:11:39 +00:00
|
|
|
function runGenerateSeedPhrasePopup() {
|
|
|
|
root.keycardModule.runGenerateSeedPhrasePopup()
|
|
|
|
}
|
|
|
|
|
|
|
|
function runImportOrRestoreViaSeedPhrasePopup() {
|
|
|
|
root.keycardModule.runImportOrRestoreViaSeedPhrasePopup()
|
|
|
|
}
|
|
|
|
|
|
|
|
function runImportFromKeycardToAppPopup() {
|
|
|
|
root.keycardModule.runImportFromKeycardToAppPopup()
|
|
|
|
}
|
|
|
|
|
2022-10-11 12:15:33 +00:00
|
|
|
function runUnlockKeycardPopupForKeycardWithUid(keycardUid) {
|
|
|
|
root.keycardModule.runUnlockKeycardPopupForKeycardWithUid(keycardUid)
|
2022-09-20 14:05:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function runDisplayKeycardContentPopup() {
|
|
|
|
root.keycardModule.runDisplayKeycardContentPopup()
|
|
|
|
}
|
|
|
|
|
|
|
|
function runFactoryResetPopup() {
|
|
|
|
root.keycardModule.runFactoryResetPopup()
|
|
|
|
}
|
2022-10-11 12:15:33 +00:00
|
|
|
|
2022-10-12 17:08:59 +00:00
|
|
|
function runRenameKeycardPopup(keycardUid, keyUid) {
|
|
|
|
root.keycardModule.runRenameKeycardPopup(keycardUid, keyUid)
|
2022-10-11 12:15:33 +00:00
|
|
|
}
|
|
|
|
|
2022-10-17 10:12:22 +00:00
|
|
|
function runChangePinPopup(keycardUid, keyUid) {
|
|
|
|
root.keycardModule.runChangePinPopup(keycardUid, keyUid)
|
2022-10-11 12:15:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function runCreateBackupCopyOfAKeycardPopup() {
|
|
|
|
root.keycardModule.runCreateBackupCopyOfAKeycardPopup()
|
|
|
|
}
|
|
|
|
|
2022-10-17 10:44:09 +00:00
|
|
|
function runCreatePukPopup(keycardUid, keyUid) {
|
|
|
|
root.keycardModule.runCreatePukPopup(keycardUid, keyUid)
|
2022-10-11 12:15:33 +00:00
|
|
|
}
|
|
|
|
|
2022-10-18 08:04:51 +00:00
|
|
|
function runCreateNewPairingCodePopup(keycardUid, keyUid) {
|
|
|
|
root.keycardModule.runCreateNewPairingCodePopup(keycardUid, keyUid)
|
2022-10-11 12:15:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function getKeycardDetailsAsJson(keycardUid) {
|
|
|
|
let jsonObj = root.keycardModule.getKeycardDetailsAsJson(keycardUid)
|
|
|
|
try {
|
|
|
|
let obj = JSON.parse(jsonObj)
|
|
|
|
return obj
|
|
|
|
}
|
|
|
|
catch (e) {
|
|
|
|
console.debug("error parsing keycard details for keycard uid: ", keycardUid, " error: ", e.message)
|
|
|
|
return {
|
|
|
|
keycardUid: keycardUid,
|
|
|
|
pubKey: "",
|
|
|
|
keyUid: "",
|
|
|
|
locked: false,
|
|
|
|
name: "",
|
|
|
|
image: "",
|
|
|
|
icon: "",
|
|
|
|
pairType: Constants.keycard.keyPairType.unknown,
|
|
|
|
derivedFrom: "",
|
|
|
|
accounts: [],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-08-16 09:19:15 +00:00
|
|
|
}
|