1
0
Fork 0
mirror of https://github.com/seiichiro0185/sailotp.git synced 2024-12-22 03:32:30 +00:00

Bugfix: Refresh HOTP-Token from Cover. Closes Github Issue #11

This commit is contained in:
seiichiro 2016-10-09 09:43:02 +02:00
parent dc6d6f9988
commit ed55e58397
2 changed files with 4 additions and 1 deletions

View file

@ -103,7 +103,9 @@ CoverBackground {
iconSource: appWin.coverType == "HOTP" ? "image://theme/icon-cover-refresh" : "image://theme/icon-cover-previous"
onTriggered: {
if (appWin.coverType == "HOTP") {
appWin.coverOTP = OTP.calcOTP(appWin.coverSecret, "HOTP", appWin.CoverLen, 0, DB.getCounter(appWin.coverTitle, appWin.coverSecret, true));
appWin.listModel.setProperty(appWin.coverIndex, "counter", DB.getCounter(appWin.coverTitle, appWin.coverSecret, true));
appWin.listModel.setProperty(appWin.coverIndex, "otp", OTP.calcOTP(appWin.coverSecret, "HOTP", appWin.coverLen, 0, appWin.listModel.get(appWin.coverIndex).counter));
appWin.coverOTP = appWin.listModel.get(appWin.coverIndex).otp;
} else {
var index = appWin.coverIndex - 1
if (index < 0) index = appWin.listModel.count - 1

View file

@ -124,6 +124,7 @@ Dialog {
TextField {
id: otpLen
width: parent.width
visible: paramType != "TOTP_STEAM" ? true : false
label: qsTr("Length")
text: paramLen
placeholderText: qsTr("Length of the Token")