added .KeyboardType(.emailAddress) to xmppaddress TextField in
LoginView.swift
This commit is contained in:
1 parent
e4b26cd651
commit
6cf74618d7
1 file changed
+24
-15
@@ -17,7 +17,7 @@ struct LoginView: View {
|
|||||||
colors: [
|
colors: [
|
||||||
Color(red: 0.08, green: 0.38, blue: 0.78),
|
Color(red: 0.08, green: 0.38, blue: 0.78),
|
||||||
Color(red: 0.12, green: 0.62, blue: 0.96),
|
Color(red: 0.12, green: 0.62, blue: 0.96),
|
||||||
Color(red: 0.44, green: 0.84, blue: 0.96)
|
Color(red: 0.44, green: 0.84, blue: 0.96),
|
||||||
],
|
],
|
||||||
startPoint: .topLeading,
|
startPoint: .topLeading,
|
||||||
endPoint: .bottomTrailing
|
endPoint: .bottomTrailing
|
||||||
@@ -76,6 +76,7 @@ struct LoginView: View {
|
|||||||
Text("XMPP-аккаунт")
|
Text("XMPP-аккаунт")
|
||||||
.font(.headline)
|
.font(.headline)
|
||||||
TextField("you@example.org", text: $jid)
|
TextField("you@example.org", text: $jid)
|
||||||
|
.keyboardType(.emailAddress)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
.disableAutocorrection(true)
|
.disableAutocorrection(true)
|
||||||
}
|
}
|
||||||
@@ -93,18 +94,24 @@ struct LoginView: View {
|
|||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
TextField("Автоматически (Luma-XXXX)", text: $resource)
|
TextField("Автоматически (Luma-XXXX)", text: $resource)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
Text("Оставьте пустым — Luma создаст уникальный ресурс для этого устройства, чтобы macOS и iOS не конфликтовали между собой.")
|
Text(
|
||||||
.font(.caption)
|
"Оставьте пустым — Luma создаст уникальный ресурс для этого устройства, чтобы macOS и iOS не конфликтовали между собой."
|
||||||
.foregroundStyle(.secondary)
|
)
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
TextField("Сервер вручную (необязательно)", text: $manualHost)
|
TextField("Сервер вручную (необязательно)", text: $manualHost)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
TextField(directTLS ? "Порт, обычно 5223" : "Порт, обычно 5222", text: $manualPort)
|
TextField(
|
||||||
.textFieldStyle(.roundedBorder)
|
directTLS ? "Порт, обычно 5223" : "Порт, обычно 5222", text: $manualPort
|
||||||
|
)
|
||||||
|
.textFieldStyle(.roundedBorder)
|
||||||
Toggle("Direct TLS", isOn: $directTLS)
|
Toggle("Direct TLS", isOn: $directTLS)
|
||||||
Text("Без ручного адреса Luma использует DNS SRV и автоматически выбирает STARTTLS/direct TLS.")
|
Text(
|
||||||
.font(.caption)
|
"Без ручного адреса Luma использует DNS SRV и автоматически выбирает STARTTLS/direct TLS."
|
||||||
.foregroundStyle(.secondary)
|
)
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
}
|
}
|
||||||
.padding(.top, 14)
|
.padding(.top, 14)
|
||||||
}
|
}
|
||||||
@@ -126,10 +133,13 @@ struct LoginView: View {
|
|||||||
.controlSize(.large)
|
.controlSize(.large)
|
||||||
.disabled(model.isAuthenticating)
|
.disabled(model.isAuthenticating)
|
||||||
|
|
||||||
Label("Сообщения отправляются с OMEMO. Пароль хранится только в Keychain.", systemImage: "lock.shield.fill")
|
Label(
|
||||||
.font(.caption)
|
"Сообщения отправляются с OMEMO. Пароль хранится только в Keychain.",
|
||||||
.foregroundStyle(.secondary)
|
systemImage: "lock.shield.fill"
|
||||||
.multilineTextAlignment(.center)
|
)
|
||||||
|
.font(.caption)
|
||||||
|
.foregroundStyle(.secondary)
|
||||||
|
.multilineTextAlignment(.center)
|
||||||
}
|
}
|
||||||
.padding(26)
|
.padding(26)
|
||||||
.background(.regularMaterial, in: RoundedRectangle(cornerRadius: 28, style: .continuous))
|
.background(.regularMaterial, in: RoundedRectangle(cornerRadius: 28, style: .continuous))
|
||||||
@@ -149,4 +159,3 @@ struct LoginView: View {
|
|||||||
await model.signIn(account: account, password: password)
|
await model.signIn(account: account, password: password)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user