Files
mowesta/ios-app/app/View/ToS/BackgroundServiceView.swift
T
stottrop 667481ec27 added user welcome screen.
includes agreement to ToS, privacy rules, Login or Registration, agreement to location accessing and  agreement to background measurements.
2020-03-04 13:58:57 +01:00

102 lines
3.4 KiB
Swift

//
// BackgroundServiceView.swift
// app
//
// Created by Tobias Stottrop on 04.03.20.
// Copyright © 2020 Marcus Handte. All rights reserved.
//
import SwiftUI
struct BackgroundServiceView: View {
@EnvironmentObject var state: NavigationStack
@Binding var agreedBGMeasurement: Bool
var body: some View {
NavigationView {
VStack {
Text("TVAskBackground").padding(.top, 20)
Spacer()
HStack(spacing: 0) {
Button(action: {
self.toggleAgreedBGMeasurement()
}){ Image(systemName: agreedBGMeasurement ? "checkmark.square" : "square")
.foregroundColor(Color("mowesta-orange")) }
.padding(.trailing, 10)
Text("TVBGCheckBody")
.foregroundColor(.gray)
}.padding(.bottom)
Spacer()
ZStack {
HStack {
Button(action: {
self.state.pop()
}) {
Image(systemName: "chevron.left")
Text("TVBack")
}
Spacer()
}
HStack {
Spacer()
Circle()
.fill(Color("mowesta-green"))
.opacity(0.5)
.frame(width: 5, height: 5)
Circle()
.fill(Color("mowesta-green"))
.frame(width: 5, height: 5)
.opacity(0.5)
Circle()
.fill(Color("mowesta-green"))
.frame(width: 5, height: 5)
.opacity(0.5)
Circle()
.fill(Color("mowesta-green"))
.frame(width: 5, height: 5)
Spacer()
}
HStack {
Spacer()
Button(action: {
self.state.push(state: AuthState.Finished)
}) {
HStack {
Text("TVFinished")
.fontWeight(.semibold)
Image(systemName: "arrow.turn.up.right")
}
.padding()
.foregroundColor(.white)
.background(Color("mowesta-green"))
.cornerRadius(40)
.animation(.default)
}
}
}
}
.navigationBarTitle("TVLocationTitle")
.padding()
}
}
func toggleAgreedBGMeasurement() {
agreedBGMeasurement = !agreedBGMeasurement
}
}
struct BackgroundServiceView_Previews: PreviewProvider {
static var previews: some View {
BackgroundServiceView(agreedBGMeasurement: .constant(false))
}
}