gemenon

[ACTIVE] The Safari of the Gemini ecosystem
git clone git://git.figbert.com/gemenon.git
Log | Files | Refs

commit 734bec213c17c671ccf1cc4f58c20808be278800
parent 3a3ed08b574cb51214b6c898042ef73af30d1c11
Author: FIGBERT <figbert@figbert.com>
Date:   Fri, 30 Sep 2022 22:02:41 -0700

Improve InputView and StatusCode handling

Diffstat:
MGemenon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2+-
MShared/CapsuleView.swift | 5+++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Gemenon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Gemenon.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,7 +6,7 @@ "location" : "git://git.figbert.com/swiftgemini.git", "state" : { "branch" : "main", - "revision" : "579c8a6eb8741adf8427cfd34c710c3503c88017" + "revision" : "86498ad2b5c196fc8b5659fbf11b87dc0dc80d2b" } }, { diff --git a/Shared/CapsuleView.swift b/Shared/CapsuleView.swift @@ -22,7 +22,7 @@ struct CapsuleView: View { case .TemporaryRedirect, .PermanentRedirect: RedirectView() default: - Text("boop") + Text(data.tab.response?.status.description ?? "boop") } } } @@ -103,7 +103,7 @@ struct InputView: View { var body: some View { VStack(spacing: 40) { VStack { - Text("\(data.tab.response?.status == .SensitiveInput ? "Sensitive " : "")Input") + Text(data.tab.response?.status.description ?? "Input") .font(.system(size: 35, weight: .bold)) if case .Prompt(let prompt) = data.tab.response?.header { Text(prompt).font(.system(size: 15)) @@ -113,6 +113,7 @@ struct InputView: View { TextField("Type here", text: $input) .frame(maxWidth: 500) .textFieldStyle(.roundedBorder) + .privacySensitive(data.tab.response?.status == .SensitiveInput) Button("Submit") { Task { var components = URLComponents(url: data.tab.url!, resolvingAgainstBaseURL: false)