diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 05d664f9..8efd516a 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -1600,7 +1600,6 @@ 4C77E36C15B84A240093A587 /* MacPass */ = { isa = PBXGroup; children = ( - 4CB1123E256EB74E00204D1B /* OTP */, 4CF9ECAE1BFDEC5700C58E99 /* Plugin */, 4C217D8E17A32BCF00609FAA /* Common */, 4C104129178CDD26001B5239 /* Categories */, @@ -1756,13 +1755,6 @@ name = Protocolls; sourceTree = ""; }; - 4CB1123E256EB74E00204D1B /* OTP */ = { - isa = PBXGroup; - children = ( - ); - name = OTP; - sourceTree = ""; - }; 4CCFA12C1BF0CC7A0078E0A1 /* Databases */ = { isa = PBXGroup; children = ( diff --git a/MacPass/MPTOTPSetupViewController.m b/MacPass/MPTOTPSetupViewController.m index 9920c684..2316068a 100644 --- a/MacPass/MPTOTPSetupViewController.m +++ b/MacPass/MPTOTPSetupViewController.m @@ -15,12 +15,14 @@ @property (strong) IBOutlet NSTextField *secretTextField; @property (strong) IBOutlet NSPopUpButton *algorithmPopUpButton; @property (strong) IBOutlet NSTextField *timeStepTextField; +@property (strong) IBOutlet NSStepper *timeStepStepper; @property (strong) IBOutlet NSPopUpButton *digitCountPopUpButton; @property (strong) IBOutlet NSImageView *qrCodeImageView; @property (strong) IBOutlet NSGridView *gridView; @property (strong) IBOutlet NSPopUpButton *typePopUpButton; @property (strong) KPKTimeOTPGenerator *generator; +@property NSInteger timeSlice; @end @@ -78,6 +80,9 @@ typedef NS_ENUM(NSUInteger, MPOTPType) { [self.typePopUpButton.menu addItem:steamItem]; [self.typePopUpButton.menu addItem:customItem]; + [self.timeStepTextField bind:NSValueBinding toObject:self withKeyPath:NSStringFromSelector(@selector(timeSlice)) options:nil]; + [self.timeStepStepper bind:NSValueBinding toObject:self withKeyPath:NSStringFromSelector(@selector(timeSlice)) options:nil]; + [self _updateView:MPOTPUpdateSourceEntry]; } @@ -131,9 +136,9 @@ typedef NS_ENUM(NSUInteger, MPOTPType) { [self.algorithmPopUpButton selectItemWithTag:self.generator.hashAlgorithm]; [self.digitCountPopUpButton selectItemWithTag:self.generator.numberOfDigits]; - - - + + self.timeSlice = self.generator.timeSlice; + } @end diff --git a/MacPass/MPTOTPSetupViewController.xib b/MacPass/MPTOTPSetupViewController.xib index 4fbe0a6a..7d5f14a2 100644 --- a/MacPass/MPTOTPSetupViewController.xib +++ b/MacPass/MPTOTPSetupViewController.xib @@ -13,6 +13,7 @@ + @@ -21,7 +22,7 @@ - + @@ -170,7 +171,7 @@ - + diff --git a/MacPass/en.lproj/Localizable.strings b/MacPass/en.lproj/Localizable.strings index f4925437..d7de0390 100644 --- a/MacPass/en.lproj/Localizable.strings +++ b/MacPass/en.lproj/Localizable.strings @@ -416,6 +416,15 @@ /* Group column title */ "GROUP" = "Group"; +/* SHA 1 hash algoritm menu item */ +"HASH_SHA1" = "Sha1"; + +/* SHA 256 hash algoritm menu item */ +"HASH_SHA256" = "Sha256"; + +/* SHA 512 hash algoritm menu item */ +"HASH_SHA512" = "Sha512"; + /* History count column title Menu item to toggle display of history count column in entry table */ "HISTORY" = "History"; @@ -540,6 +549,15 @@ /* Select Browser */ "OTHER_BROWSER" = "Select Browser…"; +/* OTP custom type */ +"OTP_CUSTOM" = "Custom settings"; + +/* OTP type RFC */ +"OTP_RFC" = "RFC 6238"; + +/* OTP type Steam */ +"OTP_STEAM" = "Steam"; + /* Value field for reference lookup */ "OUTPUT_VALUE" = "Output Value";