diff --git a/qml/pages/AddOTP.qml b/qml/pages/AddOTP.qml index c68afae..da5b8b9 100644 --- a/qml/pages/AddOTP.qml +++ b/qml/pages/AddOTP.qml @@ -40,20 +40,32 @@ Dialog { property QtObject parentPage: null // If we want to edit a Key we get title and key from the calling page + property string paramType: "TOTP" property string paramLabel: "" property string paramKey: "" + property int paramCounter: 0 SilicaFlickable { id: addOtpList anchors.fill: parent + width: parent.width VerticalScrollDecorator {} Column { anchors.fill: parent + width: parent.width DialogHeader { acceptText: paramLabel != "" ? "Save" : "Add" } + + ComboBox { + label: "Type" + menu: ContextMenu { + MenuItem { text: "Time-based"; onClicked: { paramType = "TOTP" } } + MenuItem { text: "Counter-based"; onClicked: { paramType = "HOTP" } } + } + } TextField { id: otpLabel width: parent.width @@ -72,6 +84,17 @@ Dialog { focus: true horizontalAlignment: TextInput.AlignLeft } + TextField { + id: otpCounter + width: parent.width + visible: paramType == "HOTP" ? true : false + label: "Counter Value" + text: paramCounter + placeholderText: "Initial Value of the Counter" + focus: true + horizontalAlignment: TextInput.AlignLeft + } + } }