diff --git a/src/qml/Pages/AddAccount/SignIn.qml b/src/qml/Pages/AddAccount/SignIn.qml index 2815772e..b94643be 100644 --- a/src/qml/Pages/AddAccount/SignIn.qml +++ b/src/qml/Pages/AddAccount/SignIn.qml @@ -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 diff --git a/src/qml/Pages/AddChat/FindSomeone.qml b/src/qml/Pages/AddChat/FindSomeone.qml index 70041be8..ba37ae1b 100644 --- a/src/qml/Pages/AddChat/FindSomeone.qml +++ b/src/qml/Pages/AddChat/FindSomeone.qml @@ -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 diff --git a/src/qml/Pages/AddChat/JoinRoom.qml b/src/qml/Pages/AddChat/JoinRoom.qml index 46a71a90..ed0f738a 100644 --- a/src/qml/Pages/AddChat/JoinRoom.qml +++ b/src/qml/Pages/AddChat/JoinRoom.qml @@ -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