mirror of
https://github.com/seiichiro0185/sailotp.git
synced 2024-11-21 15:29:42 +00:00
Bugfix: Refresh HOTP-Token from Cover. Closes Github Issue #11
This commit is contained in:
parent
dc6d6f9988
commit
ed55e58397
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue