Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement barebones NetP UI #1840

Merged
merged 8 commits into from
Jul 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve redeemed status (less button-like)
  • Loading branch information
graeme committed Jul 18, 2023
commit 1e280f1ffbeb2fef9c0aee13d2e5b83f9ddab756
15 changes: 9 additions & 6 deletions DuckDuckGo/NetworkProtectionStatusView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,21 @@ struct NetworkProtectionStatusView: View {
@ViewBuilder
func inviteCodeEntry() -> some View {
Section {
HStack {
TextField("Invite Code", text: $inviteModel.text)
VStack(alignment: .leading) {
HStack {
TextField("Invite Code", text: $inviteModel.text)
}
if let status = inviteModel.redeemedText {
Text(status)
.font(.caption)
.foregroundColor(.green)
}
}
Button("Submit") {
Task {
await inviteModel.submit()
}
}
if let status = inviteModel.redeemedText {
Text(status)
.foregroundColor(.green)
}
Button("Clear") {
Task {
await inviteModel.clear()
Expand Down