From 693ac4e86c583a21614b42b0644b813006e9c481 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Tue, 19 Jul 2016 19:12:41 -0700 Subject: [PATCH] add web view and placeholder about page with ZT logo and lorem ipsum --- ZeroTier One.xcodeproj/project.pbxproj | 4 +++ ZeroTier One/AboutViewController.swift | 10 ++++++ ZeroTier One/AboutViewController.xib | 19 ++++++++--- ZeroTier One/about.html | 46 ++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 ZeroTier One/about.html diff --git a/ZeroTier One.xcodeproj/project.pbxproj b/ZeroTier One.xcodeproj/project.pbxproj index 7bda39507..a8da1c561 100644 --- a/ZeroTier One.xcodeproj/project.pbxproj +++ b/ZeroTier One.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ 93326BEB1CE7D9B9005CA2AC /* JoinNetworkViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93326BE91CE7D9B9005CA2AC /* JoinNetworkViewController.xib */; }; 93326BEE1CE7DA30005CA2AC /* ShowNetworksViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93326BEC1CE7DA30005CA2AC /* ShowNetworksViewController.swift */; }; 93326BEF1CE7DA30005CA2AC /* ShowNetworksViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 93326BED1CE7DA30005CA2AC /* ShowNetworksViewController.xib */; }; + 93DAFB271D3F0BEE004D5417 /* about.html in Resources */ = {isa = PBXBuildFile; fileRef = 93DAFB261D3F0BEE004D5417 /* about.html */; }; 93DAFE4B1CFE53CA00547CC4 /* AuthtokenCopy.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DAFE4A1CFE53CA00547CC4 /* AuthtokenCopy.m */; }; /* End PBXBuildFile section */ @@ -50,6 +51,7 @@ 93326BE91CE7D9B9005CA2AC /* JoinNetworkViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = JoinNetworkViewController.xib; sourceTree = ""; }; 93326BEC1CE7DA30005CA2AC /* ShowNetworksViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShowNetworksViewController.swift; sourceTree = ""; }; 93326BED1CE7DA30005CA2AC /* ShowNetworksViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ShowNetworksViewController.xib; sourceTree = ""; }; + 93DAFB261D3F0BEE004D5417 /* about.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = about.html; sourceTree = ""; }; 93DAFE491CFE53C900547CC4 /* ZeroTier One-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ZeroTier One-Bridging-Header.h"; sourceTree = ""; }; 93DAFE4A1CFE53CA00547CC4 /* AuthtokenCopy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AuthtokenCopy.m; sourceTree = ""; }; 93DAFE4C1CFE53DA00547CC4 /* AuthtokenCopy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthtokenCopy.h; sourceTree = ""; }; @@ -108,6 +110,7 @@ 932D47381D220D63004BCFE2 /* LaunchAtLoginController.h */, 932D47391D220D63004BCFE2 /* LaunchAtLoginController.m */, 932D473B1D261ED4004BCFE2 /* NodeStatus.swift */, + 93DAFB261D3F0BEE004D5417 /* about.html */, ); path = "ZeroTier One"; sourceTree = ""; @@ -170,6 +173,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 93DAFB271D3F0BEE004D5417 /* about.html in Resources */, 93326BEF1CE7DA30005CA2AC /* ShowNetworksViewController.xib in Resources */, 932D47371D1CDC9B004BCFE2 /* AboutViewController.xib in Resources */, 93326BEB1CE7D9B9005CA2AC /* JoinNetworkViewController.xib in Resources */, diff --git a/ZeroTier One/AboutViewController.swift b/ZeroTier One/AboutViewController.swift index bbca975a9..35929dcd0 100644 --- a/ZeroTier One/AboutViewController.swift +++ b/ZeroTier One/AboutViewController.swift @@ -7,12 +7,22 @@ // import Cocoa +import WebKit class AboutViewController: NSViewController { + + @IBOutlet var webView: WebView! + override func viewDidLoad() { super.viewDidLoad() // Do view setup here. + let bundle = NSBundle.mainBundle() + let path = bundle.URLForResource("about", withExtension: "html") + + if let url = path { + webView.mainFrame.loadRequest(NSURLRequest(URL: url)) + } } } diff --git a/ZeroTier One/AboutViewController.xib b/ZeroTier One/AboutViewController.xib index 8722929fe..46c701553 100644 --- a/ZeroTier One/AboutViewController.xib +++ b/ZeroTier One/AboutViewController.xib @@ -1,19 +1,30 @@ - + - + + - + + - + + + + + + + + + + diff --git a/ZeroTier One/about.html b/ZeroTier One/about.html new file mode 100644 index 000000000..c5122fd69 --- /dev/null +++ b/ZeroTier One/about.html @@ -0,0 +1,46 @@ + + + + + +
+
+
+
+ +
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +

+ +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+
+ + \ No newline at end of file