Steam OTP display added.

This commit is contained in:
Michael Starke 2021-10-21 16:19:09 +02:00
parent 8b9c998ec7
commit 3cf0e5644e
3 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
github "sparkle-project/Sparkle" ~> 1.22
github "MacPass/TransformerKit" "a8b5bb73cc327ec6798569b865c32fec5eb2289f"
github "MacPass/KeePassKit" ~> 3.1.0
github "MacPass/KeePassKit" "3feaa35a8194695ffce2424b01ea28dcc1e3695d"
github "mstarke/HNHUi" ~> 4.0

View File

@ -1,4 +1,4 @@
github "MacPass/KeePassKit" "3.1.0"
github "MacPass/KeePassKit" "3feaa35a8194695ffce2424b01ea28dcc1e3695d"
github "MacPass/KissXML" "933f04fe5ad95c2be07ec0c2f801e140007f20fa"
github "MacPass/TransformerKit" "a8b5bb73cc327ec6798569b865c32fec5eb2289f"
github "mstarke/HNHUi" "4.0.4"

View File

@ -73,7 +73,8 @@
BOOL showTOTP = entry.hasTimeOTP;
self.view.hidden = !showTOTP;
if(showTOTP) {
self.generator = [[KPKTimeOTPGenerator alloc] initWithAttributes:entry.attributes];
self.generator = entry.hasSteamOTP ? [[KPKSteamOTPGenerator alloc] initWithAttributes:entry.attributes] : [[KPKTimeOTPGenerator alloc] initWithAttributes:entry.attributes];
self.generator.time = NSDate.date.timeIntervalSince1970;
NSString *stringValue = self.generator.string;
self.toptValueTextField.stringValue = stringValue ? stringValue : @"";