From 3cf0e5644e760d0da35297cbd2d2be52e3b54180 Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Thu, 21 Oct 2021 16:19:09 +0200 Subject: [PATCH] Steam OTP display added. --- Cartfile | 2 +- Cartfile.resolved | 2 +- MacPass/MPTOTPViewController.m | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cartfile b/Cartfile index 8dcce104..ce05fef1 100644 --- a/Cartfile +++ b/Cartfile @@ -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 diff --git a/Cartfile.resolved b/Cartfile.resolved index f7999563..f968aa71 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -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" diff --git a/MacPass/MPTOTPViewController.m b/MacPass/MPTOTPViewController.m index 2bfd34f6..707fac69 100644 --- a/MacPass/MPTOTPViewController.m +++ b/MacPass/MPTOTPViewController.m @@ -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 : @"";