mirror of
https://github.com/seiichiro0185/sailotp.git
synced 2024-11-21 23:39:41 +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"
|
iconSource: appWin.coverType == "HOTP" ? "image://theme/icon-cover-refresh" : "image://theme/icon-cover-previous"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (appWin.coverType == "HOTP") {
|
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 {
|
} else {
|
||||||
var index = appWin.coverIndex - 1
|
var index = appWin.coverIndex - 1
|
||||||
if (index < 0) index = appWin.listModel.count - 1
|
if (index < 0) index = appWin.listModel.count - 1
|
||||||
|
|
|
@ -124,6 +124,7 @@ Dialog {
|
||||||
TextField {
|
TextField {
|
||||||
id: otpLen
|
id: otpLen
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
visible: paramType != "TOTP_STEAM" ? true : false
|
||||||
label: qsTr("Length")
|
label: qsTr("Length")
|
||||||
text: paramLen
|
text: paramLen
|
||||||
placeholderText: qsTr("Length of the Token")
|
placeholderText: qsTr("Length of the Token")
|
||||||
|
|
Loading…
Reference in a new issue