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