LocationBasedServices/mowesta/ios-app%2Fshow-search-details This commit looks good
# 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.
92 lines
3.0 KiB
Swift
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))
|
|
}
|
|
}
|