Trim some text fields
This commit is contained in:
parent
001c643406
commit
e694f1739b
@ -29,8 +29,8 @@ HBox {
|
||||
errorMessage.text = ""
|
||||
|
||||
let args = [
|
||||
idField.text, passwordField.text,
|
||||
undefined, serverField.text,
|
||||
idField.text.trim(), passwordField.text,
|
||||
undefined, serverField.text.trim(),
|
||||
]
|
||||
|
||||
loginFuture = py.callCoro("login_client", args, userId => {
|
||||
@ -80,7 +80,7 @@ HBox {
|
||||
property string signInWith: "username"
|
||||
|
||||
readonly property bool canSignIn:
|
||||
serverField.text && idField.text && passwordField.text &&
|
||||
serverField.text.trim() && idField.text.trim() && passwordField.text &&
|
||||
! serverField.error
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@ HBox {
|
||||
name: "apply",
|
||||
text: qsTr("Start chat"),
|
||||
iconName: "start-direct-chat",
|
||||
enabled: Boolean(userField.text)
|
||||
enabled: Boolean(userField.text.trim())
|
||||
},
|
||||
{ name: "cancel", text: qsTr("Cancel"), iconName: "cancel" },
|
||||
]
|
||||
@ -24,7 +24,7 @@ HBox {
|
||||
button.loading = true
|
||||
errorMessage.text = ""
|
||||
|
||||
let args = [userField.text, encryptCheckBox.checked]
|
||||
let args = [userField.text.trim(), encryptCheckBox.checked]
|
||||
|
||||
py.callClientCoro(userId, "new_direct_chat", args, roomId => {
|
||||
button.loading = false
|
||||
|
@ -14,7 +14,7 @@ HBox {
|
||||
name: "apply",
|
||||
text: qsTr("Join"),
|
||||
iconName: "join",
|
||||
enabled: Boolean(roomField.text),
|
||||
enabled: Boolean(roomField.text.trim()),
|
||||
},
|
||||
{ name: "cancel", text: qsTr("Cancel"), iconName: "cancel" },
|
||||
]
|
||||
@ -24,7 +24,7 @@ HBox {
|
||||
button.loading = true
|
||||
errorMessage.text = ""
|
||||
|
||||
let args = [roomField.text]
|
||||
let args = [roomField.text.trim()]
|
||||
|
||||
py.callClientCoro(userId, "room_join", args, roomId => {
|
||||
button.loading = false
|
||||
|
Loading…
Reference in New Issue
Block a user