Files

60 lines
1.4 KiB
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// The MIT License (MIT)
//
// Copyright (c) 20202023 Alexander Grebenyuk (github.com/kean).
import CoreData
import Pulse
import Combine
import SwiftUI
@available(*, deprecated, message: "PinsView view is no longer available. Please use ConsoleView instead.") // 3.0
public struct PinsView: View {
public var body: some View {
EmptyView()
}
}
#if !os(macOS) && !os(watchOS)
@available(*, deprecated, message: "Please use ConsoleView pre-configured with .network mode") // 3.0
public struct NetworkView: View {
private let store: LoggerStore
public init(store: LoggerStore) {
self.store = store
}
public var body: some View {
ConsoleView.network(store: store)
}
}
#endif
@available(*, deprecated, message: "Please use ConsoleView directly instead") // 3.0
public struct MainView: View {
let environment: ConsoleEnvironment
public init(store: LoggerStore = .shared, onDismiss: (() -> Void)? = nil) {
self.environment = ConsoleEnvironment(store: store)
}
public var body: some View {
#if os(macOS)
ConsoleView(environment: environment)
#else
NavigationView {
ConsoleView(environment: environment)
}.navigationViewStyle(.stack)
#endif
}
}
#if DEBUG
@available(*, deprecated, message: "Deprecated") // 3.0
struct MainView_Previews: PreviewProvider {
static var previews: some View {
MainView(store: .mock)
}
}
#endif