aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--iGopherBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json2
-rw-r--r--iGopherBrowser/Assets.xcassets/AppIcon.appiconset/iGopherBrowserLogo-2 1.pngbin0 -> 81570 bytes
-rw-r--r--iGopherBrowser/Assets.xcassets/AppIcon.appiconset/iGopherBrowserLogo-2.pngbin0 -> 81570 bytes
-rw-r--r--iGopherBrowser/FileView.swift2
-rw-r--r--iGopherBrowser/SearchInputView.swift16
5 files changed, 15 insertions, 5 deletions
diff --git a/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json b/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json
index 532cd72..1110c85 100644
--- a/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,6 +1,7 @@
{
"images" : [
{
+ "filename" : "iGopherBrowserLogo-2 1.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
@@ -51,6 +52,7 @@
"size" : "512x512"
},
{
+ "filename" : "iGopherBrowserLogo-2.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
diff --git a/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/iGopherBrowserLogo-2 1.png b/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/iGopherBrowserLogo-2 1.png
new file mode 100644
index 0000000..a3e0c2e
--- /dev/null
+++ b/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/iGopherBrowserLogo-2 1.png
Binary files differ
diff --git a/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/iGopherBrowserLogo-2.png b/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/iGopherBrowserLogo-2.png
new file mode 100644
index 0000000..a3e0c2e
--- /dev/null
+++ b/iGopherBrowser/Assets.xcassets/AppIcon.appiconset/iGopherBrowserLogo-2.png
Binary files differ
diff --git a/iGopherBrowser/FileView.swift b/iGopherBrowser/FileView.swift
index 2d96526..c4080e4 100644
--- a/iGopherBrowser/FileView.swift
+++ b/iGopherBrowser/FileView.swift
@@ -79,10 +79,8 @@ struct FileView: View {
}
private func readFile(_ item: gopherItem) {
- // Execute the network request on a background thread
self.client.sendRequest(to: item.host, port: item.port, message: "\(item.selector)\r\n") { result in
// Dispatch the result handling back to the main thread
-
switch result {
case .success(let resp):
if item.parsedItemType == .text {
diff --git a/iGopherBrowser/SearchInputView.swift b/iGopherBrowser/SearchInputView.swift
index cae88f3..3780f95 100644
--- a/iGopherBrowser/SearchInputView.swift
+++ b/iGopherBrowser/SearchInputView.swift
@@ -15,16 +15,26 @@ struct SearchInputView: View {
@Binding var searchText: String
var onSearch: (String) -> Void
+ @Environment(\.presentationMode) var presentationMode
+
var body: some View {
VStack {
Text("Enter your query")
TextField("Search", text: $searchText)
.textFieldStyle(RoundedBorderTextFieldStyle())
.padding()
- Button("Search") {
- onSearch(searchText)
+ HStack {
+
+ Button("Cancel") {
+ presentationMode.wrappedValue.dismiss()
+ }
+ .padding()
+
+ Button("Search") {
+ onSearch(searchText)
+ }
+ .padding()
}
- .padding()
}
.padding()
}