diff --git a/client/ui/controllers/settingsController.cpp b/client/ui/controllers/settingsController.cpp index eda67919..6a83dcb1 100644 --- a/client/ui/controllers/settingsController.cpp +++ b/client/ui/controllers/settingsController.cpp @@ -85,7 +85,6 @@ void SettingsController::restoreAppConfig() QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation), "*.backup"); if (fileName.isEmpty()) { - emit changeSettingsErrorOccurred(tr("Backup file is empty")); return; } diff --git a/client/ui/qml/Pages2/PageSetupWizardCredentials.qml b/client/ui/qml/Pages2/PageSetupWizardCredentials.qml index dab860c1..5187a6e3 100644 --- a/client/ui/qml/Pages2/PageSetupWizardCredentials.qml +++ b/client/ui/qml/Pages2/PageSetupWizardCredentials.qml @@ -53,11 +53,9 @@ PageType { textField.validator: RegularExpressionValidator { regularExpression: InstallController.ipAddressPortRegExp() } - buttonText: qsTr("Insert") - clickedFunc: function() { - textField.text = "" - textField.paste() + onTextFieldTextChanged: { + textField.text = textField.text.replace(/^\s+|\s+$/g, ''); } } @@ -67,12 +65,6 @@ PageType { Layout.fillWidth: true headerText: qsTr("Login to connect via SSH") textFieldPlaceholderText: "root" - buttonText: qsTr("Insert") - - clickedFunc: function() { - textField.text = "" - textField.paste() - } } TextFieldWithHeaderType { @@ -83,7 +75,8 @@ PageType { Layout.fillWidth: true headerText: qsTr("Password / SSH private key") textField.echoMode: hidePassword ? TextInput.Password : TextInput.Normal - buttonImageSource: hidePassword ? "qrc:/images/controls/eye.svg" : "qrc:/images/controls/eye-off.svg" + buttonImageSource: textFieldText !== "" ? (hidePassword ? "qrc:/images/controls/eye.svg" : "qrc:/images/controls/eye-off.svg") + : "" clickedFunc: function() { hidePassword = !hidePassword diff --git a/client/ui/qml/Pages2/PageShare.qml b/client/ui/qml/Pages2/PageShare.qml index ca9dedd4..6e3fecf2 100644 --- a/client/ui/qml/Pages2/PageShare.qml +++ b/client/ui/qml/Pages2/PageShare.qml @@ -208,7 +208,7 @@ PageType { serverSelector.text = selectedText root.fullConfigServerSelectorText = selectedText root.connectionServerSelectorText = selectedText - ServersModel.currentlyProcessedIndex = currentIndex + ServersModel.currentlyProcessedIndex = proxyServersModel.mapToSource(currentIndex) } }