83 lines
3.0 KiB
Swift
83 lines
3.0 KiB
Swift
//
|
|
// CollectionView.swift - The onboarding view for data collection.
|
|
//
|
|
// Created by Marcus Handte on 13.07.22.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
|
|
struct CollectionView: View {
|
|
|
|
@ObservedObject var appState = AppState.shared
|
|
|
|
@State var enabled = false { didSet { print(enabled) }}
|
|
|
|
|
|
var body: some View {
|
|
Group {
|
|
VStack {
|
|
ScrollView {
|
|
ZStack(alignment: .topTrailing) {
|
|
VStack(alignment: .leading, spacing: 12) {
|
|
Text("collection_explain")
|
|
.font(.body)
|
|
Text("collection_note_location")
|
|
.font(.body)
|
|
Text("collection_note_data")
|
|
.font(.body)
|
|
Text("collection_note_enable")
|
|
.font(.body)
|
|
Toggle(isOn: $enabled) {
|
|
Text("collection_on_off")
|
|
.foregroundColor(Color("PrimaryColor"))
|
|
.font(.title2.smallCaps())
|
|
}.padding([.top, .bottom], 5)
|
|
Text("collection_note_permission")
|
|
.font(.body)
|
|
Button("collection_button_continue") {
|
|
// todo
|
|
}.buttonStyle(MaterialButtonStyle(disabled: false))
|
|
.padding(.top, 5)
|
|
}.padding()
|
|
Image("mowesta_sun")
|
|
.resizable()
|
|
.aspectRatio(contentMode: .fit)
|
|
.frame(width: 110, height: 110)
|
|
.offset(x: -10, y: -105)
|
|
}
|
|
}
|
|
Divider()
|
|
HStack {
|
|
Link(destination: URL(string: "https://www.uni-due.de")!) {
|
|
Image("logo_ude")
|
|
.resizable()
|
|
.aspectRatio(contentMode: .fit)
|
|
.frame(maxWidth: .infinity, maxHeight: 70)
|
|
}.padding([.leading, .trailing], 5)
|
|
Link(destination: URL(string: "https://www.fair-opendata.de")!) {
|
|
Image("logo_fair")
|
|
.resizable()
|
|
.aspectRatio(contentMode: .fit)
|
|
.frame(maxWidth: .infinity, maxHeight: 70)
|
|
}.padding([.leading, .trailing], 5)
|
|
}
|
|
}
|
|
}
|
|
.navigationTitle("collection_title")
|
|
.navigationBarTitleDisplayMode(.large)
|
|
.navigationBarHidden(false)
|
|
}
|
|
|
|
}
|
|
|
|
|
|
struct CollectionView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
NavigationView {
|
|
CollectionView()
|
|
}
|
|
}
|
|
}
|
|
|