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
|
|
|
|
|
|
|
function runRenameKeycardPopup() {
|
|
|
|
root.keycardModule.runRenameKeycardPopup()
|
|
|
|
}
|
|
|
|
|
|
|
|
function runChangePinPopup() {
|
|
|
|
root.keycardModule.runChangePinPopup()
|
|
|
|
}
|
|
|
|
|
|
|
|
function runCreateBackupCopyOfAKeycardPopup() {
|
|
|
|
root.keycardModule.runCreateBackupCopyOfAKeycardPopup()
|
|
|
|
}
|
|
|
|
|
|
|
|
function runCreatePukPopup() {
|
|
|
|
root.keycardModule.runCreatePukPopup()
|
|
|
|
}
|
|
|
|
|
|
|
|
function runCreateNewPairingCodePopup() {
|
|
|
|
root.keycardModule.runCreateNewPairingCodePopup()
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
}
|