Since minVersion is iOS 16, remove the compatability view. Signed-off-by: kingbri <bdashore3@proton.me>
44 lines
1.2 KiB
Swift
44 lines
1.2 KiB
Swift
//
|
|
// PluginInfoView.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 3/24/23.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct PluginInfoView<P: Plugin>: View {
|
|
@Environment(\.dismiss) var dismiss
|
|
|
|
@Binding var selectedPlugin: P?
|
|
|
|
var body: some View {
|
|
NavigationStack {
|
|
List {
|
|
if let selectedPlugin {
|
|
PluginInfoMetaView(selectedPlugin: selectedPlugin)
|
|
|
|
if selectedPlugin.about != nil || selectedPlugin.website != nil {
|
|
PluginInfoAboutView(selectedPlugin: selectedPlugin)
|
|
}
|
|
|
|
if let selectedSource = selectedPlugin as? Source {
|
|
SourceSettingsView(selectedSource: selectedSource)
|
|
}
|
|
}
|
|
}
|
|
.listStyle(.insetGrouped)
|
|
.onDisappear {
|
|
PersistenceController.shared.save()
|
|
}
|
|
.navigationTitle("Plugin Options")
|
|
.toolbar {
|
|
ToolbarItem(placement: .navigationBarTrailing) {
|
|
Button("Done") {
|
|
dismiss()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|