d
This commit is contained in:
@@ -4,12 +4,14 @@ import SwiftUI
|
||||
|
||||
extension MeetupId {
|
||||
public struct V: View {
|
||||
@StateObject var fmt = MeetupId.Formatter(K.textUI, K.textApp)
|
||||
let fmt = MeetupId.Debounce(5, formatId, K.textUI, K.textApp)
|
||||
@StateObject var isJoinAvailable = Cord.Receive(K.isJoinAvailable, false)
|
||||
@StateObject var isLoading = Cord.Receive(K.isLoading, false)
|
||||
@StateObject var join = Cord.Button(K.join)
|
||||
@StateObject var textField = Cord.TextField(K.textApp, K.textUI)
|
||||
let pSEJ = Bus.Processor(shouldEnableJoin, K.M, K.isJoinAvailable)
|
||||
let procs: [Any] = [
|
||||
Bus.Processor(shouldEnableJoin, K.M, K.isJoinAvailable),
|
||||
]
|
||||
|
||||
public init() { }
|
||||
|
||||
@@ -17,8 +19,12 @@ extension MeetupId {
|
||||
VStack(spacing: 8) {
|
||||
HStack {
|
||||
TextField("Binding-3", value: $textField.v, formatter: Cord.TextFieldValueOwner())
|
||||
.disabled(isLoading.v)
|
||||
.padding(8)
|
||||
.border(Color.blue, width: 2)
|
||||
.border(
|
||||
!isLoading.v ? Color.black : Color.gray,
|
||||
width: !isLoading.v ? 2 : 1
|
||||
)
|
||||
if isLoading.v {
|
||||
ProgressView()
|
||||
.padding(8)
|
||||
@@ -30,7 +36,7 @@ extension MeetupId {
|
||||
.padding(8)
|
||||
.border(
|
||||
isJoinAvailable.v ? Color.green : Color.gray,
|
||||
width: isJoinAvailable.v ? 4 : 1
|
||||
width: isJoinAvailable.v ? 2 : 1
|
||||
)
|
||||
}
|
||||
.disabled(!isJoinAvailable.v)
|
||||
|
||||
Reference in New Issue
Block a user