From 7f6a7481c8e768689cf73a969e8de6057930783f Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Tue, 2 Oct 2018 19:39:03 +0200 Subject: [PATCH] Copy public key through context menu. Signed-off-by: Jason A. Donenfeld --- WireGuard.xcodeproj/project.pbxproj | 12 +++ WireGuard/Base.lproj/Main.storyboard | 80 ++++++------------- WireGuard/CustomViews/CopyableLabel.swift | 44 ++++++++++ ...nnelConfigurationTableViewController.swift | 14 +--- .../TunnelInfoTableViewController.swift | 16 +--- 5 files changed, 84 insertions(+), 82 deletions(-) create mode 100644 WireGuard/CustomViews/CopyableLabel.swift diff --git a/WireGuard.xcodeproj/project.pbxproj b/WireGuard.xcodeproj/project.pbxproj index 817fda2..7209ab8 100644 --- a/WireGuard.xcodeproj/project.pbxproj +++ b/WireGuard.xcodeproj/project.pbxproj @@ -14,6 +14,7 @@ 4A4351592124956200261999 /* Validators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4351582124956200261999 /* Validators.swift */; }; 4A43515A2124956200261999 /* Validators.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4351582124956200261999 /* Validators.swift */; }; 4A43515C21249E5700261999 /* ValidatorsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A43515B21249E5700261999 /* ValidatorsTests.swift */; }; + 4A4B1B932163D24E00DDA3BB /* CopyableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4B1B922163D24E00DDA3BB /* CopyableLabel.swift */; }; 4A4BA6D820B73CBA00223AB8 /* TunnelConfigurationTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BA6D720B73CBA00223AB8 /* TunnelConfigurationTableViewController.swift */; }; 4A4BACE620B5F1BF00F12B28 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BACE520B5F1BF00F12B28 /* AppDelegate.swift */; }; 4A4BACE820B5F1BF00F12B28 /* TunnelsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A4BACE720B5F1BF00F12B28 /* TunnelsTableViewController.swift */; }; @@ -109,6 +110,7 @@ 4A430E832139DCFB0078172C /* icon_60pt@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon_60pt@3x.png"; path = "WireGuard/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png"; sourceTree = SOURCE_ROOT; }; 4A4351582124956200261999 /* Validators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Validators.swift; sourceTree = ""; }; 4A43515B21249E5700261999 /* ValidatorsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ValidatorsTests.swift; sourceTree = ""; }; + 4A4B1B922163D24E00DDA3BB /* CopyableLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CopyableLabel.swift; sourceTree = ""; }; 4A4BA6D720B73CBA00223AB8 /* TunnelConfigurationTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelConfigurationTableViewController.swift; sourceTree = ""; }; 4A4BACE220B5F1BF00F12B28 /* WireGuard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WireGuard.app; sourceTree = BUILT_PRODUCTS_DIR; }; 4A4BACE520B5F1BF00F12B28 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -196,6 +198,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 4A4B1B912163D23C00DDA3BB /* CustomViews */ = { + isa = PBXGroup; + children = ( + 4A4B1B922163D24E00DDA3BB /* CopyableLabel.swift */, + ); + path = CustomViews; + sourceTree = ""; + }; 4A4BACD920B5F1BF00F12B28 = { isa = PBXGroup; children = ( @@ -224,6 +234,7 @@ 4A4BACE420B5F1BF00F12B28 /* WireGuard */ = { isa = PBXGroup; children = ( + 4A4B1B912163D23C00DDA3BB /* CustomViews */, 4ABFFEA1212D39CA00107136 /* Crypto */, 4A61D83320D98D07006C7A76 /* WireGuard.entitlements */, 4A4BAD1420B5F8C000F12B28 /* Models */, @@ -635,6 +646,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 4A4B1B932163D24E00DDA3BB /* CopyableLabel.swift in Sources */, 4A8A229A215B782E00736141 /* AppCoordinator+TunnelConfigurationTableViewControllerDelegate.swift in Sources */, 4A8A22A0215B821A00736141 /* ExtensionMessage.swift in Sources */, 4A4BAD0C20B5F6AA00F12B28 /* AppCoordinator.swift in Sources */, diff --git a/WireGuard/Base.lproj/Main.storyboard b/WireGuard/Base.lproj/Main.storyboard index 2a5cc2c..cec4ae8 100644 --- a/WireGuard/Base.lproj/Main.storyboard +++ b/WireGuard/Base.lproj/Main.storyboard @@ -223,25 +223,14 @@ - -