mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-02-16 12:52:11 +00:00
parent
9e6e59276b
commit
c0234b07a8
@ -48,26 +48,32 @@ struct PassepartoutApp: App {
|
|||||||
private var theme = Theme()
|
private var theme = Theme()
|
||||||
|
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
Window(appName, id: appName) {
|
#if os(iOS)
|
||||||
AppCoordinator(
|
WindowGroup(content: content)
|
||||||
profileManager: context.profileManager,
|
#else
|
||||||
tunnel: context.tunnel,
|
Window(appName, id: appName, content: content)
|
||||||
registry: context.registry
|
.defaultSize(width: 600.0, height: 400.0)
|
||||||
)
|
|
||||||
.onLoad {
|
|
||||||
CommonLibrary.configureLogging(
|
|
||||||
to: Constants.shared.urlForAppLog,
|
|
||||||
parameters: Constants.shared.log
|
|
||||||
)
|
|
||||||
AppUI.configure(with: context)
|
|
||||||
}
|
|
||||||
.themeLockScreen()
|
|
||||||
.environmentObject(theme)
|
|
||||||
.environmentObject(context.iapManager)
|
|
||||||
.environmentObject(context.connectionObserver)
|
|
||||||
}
|
|
||||||
#if os(macOS)
|
|
||||||
.defaultSize(width: 600.0, height: 400.0)
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extension PassepartoutApp {
|
||||||
|
func content() -> some View {
|
||||||
|
AppCoordinator(
|
||||||
|
profileManager: context.profileManager,
|
||||||
|
tunnel: context.tunnel,
|
||||||
|
registry: context.registry
|
||||||
|
)
|
||||||
|
.onLoad {
|
||||||
|
CommonLibrary.configureLogging(
|
||||||
|
to: Constants.shared.urlForAppLog,
|
||||||
|
parameters: Constants.shared.log
|
||||||
|
)
|
||||||
|
AppUI.configure(with: context)
|
||||||
|
}
|
||||||
|
.themeLockScreen()
|
||||||
|
.environmentObject(theme)
|
||||||
|
.environmentObject(context.iapManager)
|
||||||
|
.environmentObject(context.connectionObserver)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user