From e08b116aa0667c3a105d3b38b00c504923d51c4f Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Sat, 28 Nov 2020 23:10:45 +0100 Subject: [PATCH] WIP on adding TOTP ui to entry view --- Cartfile | 2 +- Cartfile.resolved | 2 +- MacPass.xcodeproj/project.pbxproj | 10 +++ MacPass/Base.lproj/EntryInspectorView.xib | 43 ++++++------ MacPass/Base.lproj/InspectorView.xib | 2 +- MacPass/KPKEntry+OTP.h | 6 ++ MacPass/KPKEntry+OTP.m | 12 +++- MacPass/MPAddCustomFieldContextMenuDelegate.m | 40 ++++++++++- MacPass/MPEntryInspectorViewController.h | 5 ++ MacPass/MPEntryInspectorViewController.m | 37 ++++++++--- MacPass/MPInspectorViewController.m | 4 -- MacPass/MPOTPViewController.h | 20 ++++++ MacPass/MPTOTPViewController.h | 20 ++++++ MacPass/MPTOTPViewController.m | 56 ++++++++++++++++ MacPass/MPTOTPViewController.xib | 66 +++++++++++++++++++ 15 files changed, 282 insertions(+), 43 deletions(-) create mode 100644 MacPass/MPOTPViewController.h create mode 100644 MacPass/MPTOTPViewController.h create mode 100644 MacPass/MPTOTPViewController.m create mode 100644 MacPass/MPTOTPViewController.xib diff --git a/Cartfile b/Cartfile index c9a0cfdb..99e78eb8 100644 --- a/Cartfile +++ b/Cartfile @@ -1,4 +1,4 @@ github "sparkle-project/Sparkle" ~> 1.22 github "mattt/TransformerKit" ~> 1.1.1 -github "MacPass/KeePassKit" "4993fc9e0f4dc7dc010c7ed9c3c54d9f1484b8f9" +github "MacPass/KeePassKit" "958637c267d29d4db59773d215d08e52b18442c0" github "mstarke/HNHUi" ~> 4.0 diff --git a/Cartfile.resolved b/Cartfile.resolved index 391057b8..6875c82d 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,4 @@ -github "MacPass/KeePassKit" "4993fc9e0f4dc7dc010c7ed9c3c54d9f1484b8f9" +github "MacPass/KeePassKit" "958637c267d29d4db59773d215d08e52b18442c0" github "mattt/TransformerKit" "1.1.1" github "mstarke/HNHUi" "4.0.2" github "robbiehanson/KissXML" "5.3.2" diff --git a/MacPass.xcodeproj/project.pbxproj b/MacPass.xcodeproj/project.pbxproj index 57e7b9df..ea4f2952 100644 --- a/MacPass.xcodeproj/project.pbxproj +++ b/MacPass.xcodeproj/project.pbxproj @@ -48,6 +48,8 @@ 4C25703F1BF11C2300D39416 /* MPPluginPreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C25703D1BF11C2300D39416 /* MPPluginPreferencesController.m */; }; 4C25D58716CF0FAA00F6806C /* EntryView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C25D58616CF0FAA00F6806C /* EntryView.xib */; }; 4C26C33F18D8C92100CF1A1C /* MPTemporaryFileStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C26C33E18D8C92100CF1A1C /* MPTemporaryFileStorage.m */; }; + 4C2892A8257103F9003C7732 /* MPTOTPViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C2892A6257103F9003C7732 /* MPTOTPViewController.m */; }; + 4C2892A9257103F9003C7732 /* MPTOTPViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4C2892A7257103F9003C7732 /* MPTOTPViewController.xib */; }; 4C2E381D16D11FF900037A9D /* 03_ServerTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C2E381A16D11FF900037A9D /* 03_ServerTemplate.pdf */; }; 4C2E381E16D11FF900037A9D /* 04_KlipperTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C2E381B16D11FF900037A9D /* 04_KlipperTemplate.pdf */; }; 4C2E381F16D11FF900037A9D /* 05_LanguagesTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 4C2E381C16D11FF900037A9D /* 05_LanguagesTemplate.pdf */; }; @@ -433,6 +435,9 @@ 4C272A292224871900186EEC /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/PluginDataView.strings; sourceTree = ""; }; 4C272A2A2224871900186EEC /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/OpenPanelAccessoryView.strings; sourceTree = ""; }; 4C272A2B2224871900186EEC /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/PickfieldView.strings; sourceTree = ""; }; + 4C2892A5257103F9003C7732 /* MPTOTPViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MPTOTPViewController.h; sourceTree = ""; }; + 4C2892A6257103F9003C7732 /* MPTOTPViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MPTOTPViewController.m; sourceTree = ""; }; + 4C2892A7257103F9003C7732 /* MPTOTPViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MPTOTPViewController.xib; sourceTree = ""; }; 4C2B0B7419F66F6400E48913 /* MPTargetNodeResolving.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MPTargetNodeResolving.h; sourceTree = ""; }; 4C2E381A16D11FF900037A9D /* 03_ServerTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 03_ServerTemplate.pdf; sourceTree = ""; }; 4C2E381B16D11FF900037A9D /* 04_KlipperTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = 04_KlipperTemplate.pdf; sourceTree = ""; }; @@ -1380,6 +1385,9 @@ 4C77547316E55FE800970E02 /* MPInspectorViewController.h */, 4C77547416E55FE800970E02 /* MPInspectorViewController.m */, 4C76156F1764C0E20015A1A6 /* InspectorView.xib */, + 4C2892A5257103F9003C7732 /* MPTOTPViewController.h */, + 4C2892A6257103F9003C7732 /* MPTOTPViewController.m */, + 4C2892A7257103F9003C7732 /* MPTOTPViewController.xib */, ); name = Inspector; sourceTree = ""; @@ -2037,6 +2045,7 @@ 4C0DBEF51BF508DE00F9B287 /* PluginPreferences.xib in Resources */, 4CF6653820E67A140008A25C /* PluginDataView.xib in Resources */, 4C7F8B681A10B68400CCB83D /* WelcomeView.xib in Resources */, + 4C2892A9257103F9003C7732 /* MPTOTPViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2224,6 +2233,7 @@ 4C5807781C64F67000E7171F /* NSString+MPHash.m in Sources */, 4CAAA8271D787B8B00CDE977 /* MPAutotypeBuilderViewController.m in Sources */, 4CE501341BBC47F500FB819D /* MPTagsTokenFieldDelegate.m in Sources */, + 4C2892A8257103F9003C7732 /* MPTOTPViewController.m in Sources */, 4CC6DB7A17D23719002C6091 /* KPKNode+IconImage.m in Sources */, 4C15B74618BCA3B1003F8008 /* MPDocument+Search.m in Sources */, 4CEED1C617D7BD0E007180F1 /* NSError+Messages.m in Sources */, diff --git a/MacPass/Base.lproj/EntryInspectorView.xib b/MacPass/Base.lproj/EntryInspectorView.xib index ef22e123..d65f1f65 100644 --- a/MacPass/Base.lproj/EntryInspectorView.xib +++ b/MacPass/Base.lproj/EntryInspectorView.xib @@ -1,8 +1,8 @@ - + - + @@ -47,8 +47,8 @@ - - + + @@ -73,7 +73,7 @@