1
0
mirror of https://github.com/QRouland/UTPass.git synced 2025-01-24 23:56:39 +00:00
UTPass/qml/Main.qml

47 lines
1.2 KiB
QML
Raw Normal View History

import Lomiri.Components 1.3
import Lomiri.Components.Popups 1.3
2019-09-20 21:29:39 +02:00
import Pass 1.0
2025-01-10 15:28:42 +01:00
import QtQuick 2.4
import QtQuick.Layouts 1.1
2019-09-20 21:29:39 +02:00
import "dialogs"
MainView {
id: root
signal responsePassphraseDialog(bool canceled, string passphrase)
function initPass(rootView) {
2025-01-10 15:28:42 +01:00
Pass.init(rootView);
pageStack.push(Qt.resolvedUrl("pages/PasswordList.qml"));
2019-09-20 21:29:39 +02:00
}
function callPassphraseDialog(useridHint, description, previousWasBad) {
//TODO use parameters to impove passphrase dialog
2025-01-10 15:28:42 +01:00
var passphraseDialog = PopupUtils.open(Qt.resolvedUrl("dialogs/PassphraseDialog.qml"));
passphraseDialog.activateFocus();
var validated = function (passphrase) {
2025-01-10 15:28:42 +01:00
responsePassphraseDialog(false, passphrase);
};
var canceled = function () {
2025-01-10 15:28:42 +01:00
responsePassphraseDialog(true, "");
};
passphraseDialog.validated.connect(validated);
passphraseDialog.canceled.connect(canceled);
2019-09-20 21:29:39 +02:00
}
2025-01-10 15:28:42 +01:00
objectName: "mainView"
applicationName: "utpass.qrouland"
automaticOrientation: false
width: units.gu(48)
height: units.gu(80)
2019-09-20 21:29:39 +02:00
PageStack {
id: pageStack
2025-01-10 15:28:42 +01:00
anchors.fill: parent
Component.onCompleted: {
}
2019-09-20 21:29:39 +02:00
}
2025-01-10 15:28:42 +01:00
2019-09-20 21:29:39 +02:00
}