diff --git a/client/ui/pages_logic/ClientManagementLogic.cpp b/client/ui/pages_logic/ClientManagementLogic.cpp index 21409654..5bd5948d 100644 --- a/client/ui/pages_logic/ClientManagementLogic.cpp +++ b/client/ui/pages_logic/ClientManagementLogic.cpp @@ -35,6 +35,7 @@ void ClientManagementLogic::onUpdatePage() if (error != ErrorCode::NoError) { QMessageBox::warning(nullptr, APPLICATION_NAME, tr("An error occurred while getting the list of clients.") + "\n" + errorString(error)); + set_busyIndicatorIsRunning(false); return; } } diff --git a/client/ui/qml/Pages/ClientInfo/PageClientInfoOpenVPN.qml b/client/ui/qml/Pages/ClientInfo/PageClientInfoOpenVPN.qml index 38dd00bb..57a1f74e 100644 --- a/client/ui/qml/Pages/ClientInfo/PageClientInfoOpenVPN.qml +++ b/client/ui/qml/Pages/ClientInfo/PageClientInfoOpenVPN.qml @@ -9,10 +9,10 @@ import "../../Config" PageClientInfoBase { id: root protocol: ProtocolEnum.OpenVpn - enabled: !ClientInfoLogic.busyIndicatorIsRunning BackButton { id: back + enabled: !ClientInfoLogic.busyIndicatorIsRunning } Caption { @@ -50,6 +50,7 @@ PageClientInfoBase { anchors.right: parent.right LabelType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.fillWidth: true font.pixelSize: 20 horizontalAlignment: Text.AlignHCenter @@ -57,39 +58,47 @@ PageClientInfoBase { } LabelType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning height: 21 text: qsTr("Client name") } TextFieldType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.fillWidth: true Layout.preferredHeight: 31 text: ClientInfoLogic.lineEditNameAliasText onEditingFinished: { - ClientInfoLogic.lineEditNameAliasText = text - ClientInfoLogic.onLineEditNameAliasEditingFinished() + if (text !== ClientInfoLogic.lineEditNameAliasText) { + ClientInfoLogic.lineEditNameAliasText = text + ClientInfoLogic.onLineEditNameAliasEditingFinished() + } } } LabelType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.topMargin: 20 height: 21 text: qsTr("Certificate id") } LabelType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter text: ClientInfoLogic.labelOpenVpnCertId } LabelType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.topMargin: 20 height: 21 text: qsTr("Certificate") } TextAreaType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.preferredHeight: 200 Layout.fillWidth: true @@ -100,6 +109,7 @@ PageClientInfoBase { } BlueButtonType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.fillWidth: true Layout.preferredHeight: 41 text: qsTr("Revoke Certificate") diff --git a/client/ui/qml/Pages/ClientInfo/PageClientInfoWireGuard.qml b/client/ui/qml/Pages/ClientInfo/PageClientInfoWireGuard.qml index 97bd4b0d..07029efd 100644 --- a/client/ui/qml/Pages/ClientInfo/PageClientInfoWireGuard.qml +++ b/client/ui/qml/Pages/ClientInfo/PageClientInfoWireGuard.qml @@ -9,10 +9,10 @@ import "../../Config" PageClientInfoBase { id: root protocol: ProtocolEnum.WireGuard - enabled: !ClientInfoLogic.busyIndicatorIsRunning BackButton { id: back + enabled: !ClientInfoLogic.busyIndicatorIsRunning } Caption { @@ -50,6 +50,7 @@ PageClientInfoBase { anchors.right: parent.right LabelType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.fillWidth: true font.pixelSize: 20 horizontalAlignment: Text.AlignHCenter @@ -57,27 +58,33 @@ PageClientInfoBase { } LabelType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning height: 21 text: qsTr("Client name") } TextFieldType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.fillWidth: true Layout.preferredHeight: 31 text: ClientInfoLogic.lineEditNameAliasText onEditingFinished: { - ClientInfoLogic.lineEditNameAliasText = text - ClientInfoLogic.onLineEditNameAliasEditingFinished() + if (text !== ClientInfoLogic.lineEditNameAliasText) { + ClientInfoLogic.lineEditNameAliasText = text + ClientInfoLogic.onLineEditNameAliasEditingFinished() + } } } LabelType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.topMargin: 20 height: 21 text: qsTr("Public Key") } TextAreaType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.preferredHeight: 200 Layout.fillWidth: true @@ -88,6 +95,7 @@ PageClientInfoBase { } BlueButtonType { + enabled: !ClientInfoLogic.busyIndicatorIsRunning Layout.fillWidth: true Layout.preferredHeight: 41 text: qsTr("Revoke Key")