Adds support for playing links on a preset Kodi server. This is less featured than the Ferrite companion, but should still work without a problem. Signed-off-by: kingbri <bdashore3@proton.me>
34 lines
810 B
Swift
34 lines
810 B
Swift
//
|
|
// HybridSecureField.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 3/4/23.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct HybridSecureField: View {
|
|
@Binding var text: String
|
|
@State private var showPassword = false
|
|
|
|
var body: some View {
|
|
HStack {
|
|
Group {
|
|
if showPassword {
|
|
TextField("Password", text: $text)
|
|
} else {
|
|
SecureField("Password", text: $text)
|
|
}
|
|
}
|
|
.autocorrectionDisabled(true)
|
|
.autocapitalization(.none)
|
|
|
|
Button {
|
|
showPassword.toggle()
|
|
} label: {
|
|
Image(systemName: self.showPassword ? "eye.slash.fill" : "eye.fill")
|
|
.foregroundColor(.secondary)
|
|
}
|
|
}
|
|
}
|
|
}
|