From b6f105d3559d9352ac6e9418903eff3c8cc9f4af Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 4 Dec 2015 16:27:28 +0100 Subject: [PATCH] Also handle steam authenticator tokens on the cover --- qml/cover/CoverPage.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qml/cover/CoverPage.qml b/qml/cover/CoverPage.qml index 6a31e98..2aa4247 100644 --- a/qml/cover/CoverPage.qml +++ b/qml/cover/CoverPage.qml @@ -41,9 +41,15 @@ CoverBackground { function updateOTP() { // get seconds from current Date var curDate = new Date(); + var type; if (lOTP.text == "------" || curDate.getSeconds() == 30 || curDate.getSeconds() == 0 || (curDate.getTime() - lastUpdated > 2000)) { - appWin.coverOTP = OTP.calcOTP(appWin.coverSecret, "TOTP", 0); + if (appWin.coverTitle.substr(0,6) == "Steam:") { + type = "TOTP_STEAM" + } else { + type = "TOTP" + } + appWin.coverOTP = OTP.calcOTP(appWin.coverSecret, type, 0); } // Change color of the OTP to red if less than 5 seconds left