The overall UI of Ferrite has been changed to make animations smoother and streamline the experiences. A new search filter interface has been added for all iOS versions, but iOS 15 and up have smooth UI applied due to bugs with searchbars in iOS 14 (which shouldn't even have a searchbar in the first place). Also fix the plugin fetching logic to not listen to a combine publisher and instead use a notification that is easier to control. Signed-off-by: kingbri <bdashore3@proton.me>
27 lines
781 B
Swift
27 lines
781 B
Swift
//
|
|
// PluginPickerView.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 2/14/23.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct PluginPickerView: View {
|
|
@Environment(\.verticalSizeClass) var verticalSizeClass
|
|
|
|
@EnvironmentObject var navModel: NavigationViewModel
|
|
|
|
@State private var textName = ""
|
|
@State private var secondTextName = ""
|
|
|
|
var body: some View {
|
|
Picker("Segments", selection: $navModel.pluginPickerSelection) {
|
|
Text("Sources").tag(NavigationViewModel.PluginPickerSegment.sources)
|
|
Text("Actions").tag(NavigationViewModel.PluginPickerSegment.actions)
|
|
}
|
|
.pickerStyle(.segmented)
|
|
.padding(.horizontal, verticalSizeClass == .compact && UIDevice.current.hasNotch ? 65 : 18)
|
|
.padding(.vertical, 5)
|
|
}
|
|
}
|