New updates
This commit is contained in:
@@ -4,6 +4,7 @@ import SwiftData
|
||||
struct ContentView: View {
|
||||
let startupStorageError: String?
|
||||
@EnvironmentObject private var automation: BackgroundSyncCoordinator
|
||||
@EnvironmentObject private var licensing: LicensingManager
|
||||
@Environment(\.openWindow) private var openWindow
|
||||
@State private var selectedJob: SyncJob?
|
||||
@State private var section: AppSection = .jobs
|
||||
@@ -17,8 +18,11 @@ struct ContentView: View {
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
mainContent
|
||||
.opacity(showingSplash ? 0 : 1)
|
||||
Group {
|
||||
if licensing.canUseApp { mainContent }
|
||||
else { LicenseRequiredView() }
|
||||
}
|
||||
.opacity(showingSplash ? 0 : 1)
|
||||
|
||||
if showingSplash {
|
||||
SplashView()
|
||||
@@ -38,6 +42,13 @@ struct ContentView: View {
|
||||
try? await Task.sleep(for: .seconds(1.0))
|
||||
withAnimation(.easeOut(duration: 0.28)) { showingSplash = false }
|
||||
}
|
||||
.task {
|
||||
while !Task.isCancelled {
|
||||
try? await Task.sleep(for: .seconds(900))
|
||||
if Task.isCancelled { return }
|
||||
licensing.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var mainContent: some View {
|
||||
|
||||
Reference in New Issue
Block a user