summaryrefslogtreecommitdiff
path: root/watchos/InfiniSolar/InfiniSolar WatchKit Extension/InfiniSolarApp.swift
blob: c6371b411f090d295fbddc9c8cf748c858d3b5e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
//  InfiniSolarApp.swift
//  InfiniSolar WatchKit Extension
//
//  Created by Evgeny Zinoviev on 03.08.2021.
//

import SwiftUI

@main
struct InfiniSolarApp: App {
    @SceneBuilder var body: some Scene {
        WindowGroup {
            NavigationView {
                ScrollView(.vertical) {
                    VStack(alignment: .leading) {
                        InverterView()
                        self.divider()
                        
                        RoomView()
                        self.divider()
                        
                        PumpView()
                    }
                    .frame(
                        minWidth: 0,
                        maxWidth: .infinity,
                        minHeight: 0,
                        maxHeight: .infinity,
                        alignment: .topLeading
                    )
                }
            }
        }

        WKNotificationScene(controller: NotificationController.self, category: "myCategory")
    }
    
    func divider() -> some View {
        return Divider()
            .padding(EdgeInsets(top: 12, leading: 4, bottom: 12, trailing: 4))
    }
}