Files
mowesta/ios-app/app/View/ToS/LocationServiceView.swift
T
stottrop 443c5cbb15
LocationBasedServices/mowesta/ios-app%2Fshow-search-details This commit looks good
Merge remote-tracking branch 'remotes/origin/master' into ios-app/show-search-details
# Conflicts:
#	ios-app/app.xcodeproj/project.pbxproj
#	ios-app/app/AppDelegate.swift
#	ios-app/app/Data/User/UserData.swift
#	ios-app/app/Extensions/Coordinate+Extensions.swift
#	ios-app/app/Resources/Mowesta.xcdatamodeld/Mowesta.xcdatamodel/contents

Forgot that I was merging therefore:
added function to reset Application and logout user.
added alternative screen as tutorial when no favorites are shown.
added some translations.
2020-03-04 18:10:21 +01:00

92 lines
3.0 KiB
Swift

//
// LocationServiceView.swift
// app
//
// Created by Tobias Stottrop on 03.03.20.
// Copyright © 2020 Marcus Handte. All rights reserved.
//
import SwiftUI
struct LocationServiceView: View {
@EnvironmentObject var state: NavigationStack
@Binding var agreedBGMeasurement: Bool
var body: some View {
NavigationView {
VStack {
Text("TVLocationBody").padding(.top, 20)
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)
Circle()
.fill(Color("mowesta-green"))
.opacity(0.5)
.frame(width: 5, height: 5)
Spacer()
}
HStack {
Spacer()
Button(action: {
LocationService.shared.askUser()
self.state.push(state: AuthState.BackgroundScreen)
}) {
HStack {
Text("TVNext")
.fontWeight(.semibold)
Image(systemName: "chevron.right")
}
.padding()
.foregroundColor(.white)
.background(Color("mowesta-green"))
.cornerRadius(40)
.animation(.default)
}
}
}
}
.padding()
.navigationBarTitle("TVAlmost")
}
}
func toggleAgreedBGMeasurement() {
agreedBGMeasurement = !agreedBGMeasurement
}
}
struct LocationServiceView_Previews: PreviewProvider {
static var previews: some View {
LocationServiceView(agreedBGMeasurement: .constant(false))
}
}