wip
This commit is contained in:
parent
f9de9e3800
commit
f06208ec66
|
@ -1,3 +1,4 @@
|
||||||
|
import SwiftfulRouting
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
@main
|
@main
|
||||||
|
@ -6,7 +7,9 @@ struct AnotherIMApp: App {
|
||||||
|
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup {
|
WindowGroup {
|
||||||
|
RouterView { _ in
|
||||||
RootView()
|
RootView()
|
||||||
|
}
|
||||||
.environmentObject(wrapper)
|
.environmentObject(wrapper)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,17 +2,27 @@ import SwiftUI
|
||||||
|
|
||||||
struct RootView: View {
|
struct RootView: View {
|
||||||
@EnvironmentObject var wrapper: MonalXmppWrapper
|
@EnvironmentObject var wrapper: MonalXmppWrapper
|
||||||
|
@Environment(\.router) var router
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
ZStack {
|
||||||
Image(systemName: "globe")
|
Color.Material.Background.dark
|
||||||
.imageScale(.large)
|
Image(.aimLogo)
|
||||||
.foregroundStyle(.tint)
|
.resizable()
|
||||||
Text("Hello, world!")
|
.frame(width: 200, height: 200)
|
||||||
}
|
}
|
||||||
.padding()
|
.ignoresSafeArea()
|
||||||
.onAppear {
|
.onAppear {
|
||||||
print("test")
|
switch wrapper.accountsAvailability {
|
||||||
|
case .noAccounts:
|
||||||
|
break
|
||||||
|
|
||||||
|
case .someEnabled:
|
||||||
|
break
|
||||||
|
|
||||||
|
case .allDisabled:
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue