Added the current update

This commit is contained in:
SerenityUX 2023-04-29 20:28:48 -04:00
parent 42590eaf00
commit 55c0957511
5 changed files with 99 additions and 29 deletions

View file

@ -1,13 +1,14 @@
import SwiftUI
struct ContentView: View {
@State private var connectedHackClubNetwork = false
@ObservedObject var viewModel = NetworkConfiguration()
var body: some View {
VStack(alignment: .leading) {
HStack {
Text("Networks")
Text(verbatim: "Networks \(viewModel.model.status)")
.font(.title3)
Spacer()
Image(systemName: "badge.plus.radiowaves.forward")
@ -21,10 +22,30 @@ struct ContentView: View {
.padding(.top, 2)
.font(.subheadline.weight(.bold))
HStack {
Image("hackClubLogo")
.resizable()
.frame(width: 32, height: 32)
.cornerRadius(100)
if (viewModel.status == .unknown) {
Image("hackClubLogo")
.resizable()
.frame(width: 32, height: 32)
.cornerRadius(100).onTapGesture {
viewModel.connectToBurrow()
print(viewModel.status)
}
} else if (viewModel.status == .loading) {
ZStack {
Image("hackClubLogo")
.resizable()
.frame(width: 32, height: 32)
.cornerRadius(100)
.overlay(Color.white.opacity(0.6).cornerRadius(100))
ProgressView()
.progressViewStyle(CircularProgressViewStyle())
.scaleEffect(0.6)
}
}
VStack(alignment: .leading) {
Text("Hack Club Network")
@ -35,7 +56,7 @@ struct ContentView: View {
.font(.caption2)
.foregroundColor(.blue)
}.onTapGesture {
connectedHackClubNetwork = true
print(true)
}
}
}