2022-12-01 09:05:26 +01:00
|
|
|
import SwiftUI
|
|
|
|
import Timeline
|
|
|
|
import Network
|
|
|
|
import KeychainSwift
|
|
|
|
|
|
|
|
@main
|
|
|
|
struct IceCubesApp: App {
|
2022-12-17 13:37:46 +01:00
|
|
|
public static let defaultServer = "mastodon.social"
|
2022-12-01 09:05:26 +01:00
|
|
|
|
|
|
|
@StateObject private var appAccountsManager = AppAccountsManager()
|
|
|
|
|
|
|
|
var body: some Scene {
|
|
|
|
WindowGroup {
|
|
|
|
TabView {
|
|
|
|
TimelineTab()
|
|
|
|
.tabItem {
|
|
|
|
Label("Home", systemImage: "globe")
|
|
|
|
}
|
2022-12-20 15:37:51 +01:00
|
|
|
if appAccountsManager.currentClient.isAuth {
|
|
|
|
NotificationsTab()
|
|
|
|
.tabItem {
|
|
|
|
Label("Notifications", systemImage: "bell")
|
|
|
|
}
|
|
|
|
}
|
2022-12-01 09:05:26 +01:00
|
|
|
SettingsTabs()
|
|
|
|
.tabItem {
|
|
|
|
Label("Settings", systemImage: "gear")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.environmentObject(appAccountsManager)
|
|
|
|
.environmentObject(appAccountsManager.currentClient)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|