1
0
Fork 0
mirror of https://github.com/seiichiro0185/sailotp.git synced 2024-11-21 23:39:41 +00:00

Added type and counter value to the Add/Edit-Page

This commit is contained in:
seiichiro 2014-01-12 16:25:02 +01:00
parent 7dfd336c77
commit 5ddc4dcf90

View file

@ -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
}
}
}