From a93f75fb5a6defd9a77398324046021b9347ec68 Mon Sep 17 00:00:00 2001 From: "vladimir.kuznetsov" Date: Wed, 4 Oct 2023 14:40:17 +0500 Subject: [PATCH 1/3] added full version to page about --- client/ui/controllers/settingsController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/ui/controllers/settingsController.cpp b/client/ui/controllers/settingsController.cpp index 3edfe3d9..78d0dd67 100644 --- a/client/ui/controllers/settingsController.cpp +++ b/client/ui/controllers/settingsController.cpp @@ -22,7 +22,7 @@ SettingsController::SettingsController(const QSharedPointer &serve m_languageModel(languageModel), m_settings(settings) { - m_appVersion = QString("%1: %2 (%3)").arg(tr("Software version"), QString(APP_MAJOR_VERSION), __DATE__); + m_appVersion = QString("%1: %2 (%3)").arg(tr("Software version"), QString(APP_VERSION), __DATE__); #ifdef Q_OS_ANDROID if (!m_settings->isScreenshotsEnabled()) { @@ -193,4 +193,4 @@ void SettingsController::toggleScreenshotsEnabled(bool enable) } }); #endif -} \ No newline at end of file +} From a83ec10b61ae4b3d704f5063e45a4bd1a427d6ac Mon Sep 17 00:00:00 2001 From: "vladimir.kuznetsov" Date: Wed, 4 Oct 2023 14:47:10 +0500 Subject: [PATCH 2/3] updated description for full access sharing --- client/ui/qml/Pages2/PageShare.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ui/qml/Pages2/PageShare.qml b/client/ui/qml/Pages2/PageShare.qml index 00b65310..6c284278 100644 --- a/client/ui/qml/Pages2/PageShare.qml +++ b/client/ui/qml/Pages2/PageShare.qml @@ -172,7 +172,7 @@ PageType { Layout.bottomMargin: 24 text: accessTypeSelector.currentIndex === 0 ? qsTr("VPN access without the ability to manage the server") : - qsTr("Full access to server") + qsTr("Access to server management. The user with whom you share full access to the connection will be able to add and remove your protocols and services to the servers, as well as change settings.") color: "#878B91" } From 396b7aac18977d04caacc3ff9bd2c67daea72757 Mon Sep 17 00:00:00 2001 From: "vladimir.kuznetsov" Date: Thu, 5 Oct 2023 13:56:00 +0500 Subject: [PATCH 3/3] fixed display of amnezia dns description on main menu --- client/ui/qml/Pages2/PageHome.qml | 92 +++++++++++++++++++------------ 1 file changed, 56 insertions(+), 36 deletions(-) diff --git a/client/ui/qml/Pages2/PageHome.qml b/client/ui/qml/Pages2/PageHome.qml index d395cd22..3808fb15 100644 --- a/client/ui/qml/Pages2/PageHome.qml +++ b/client/ui/qml/Pages2/PageHome.qml @@ -26,6 +26,55 @@ PageType { property string defaultServerHostName: ServersModel.defaultServerHostName property string defaultContainerName: ContainersModel.defaultContainerName + Connections { + target: PageController + + function onRestorePageHomeState(isContainerInstalled) { + buttonContent.state = "expanded" + if (isContainerInstalled) { + containersDropDown.menuVisible = true + } + } + function onForceCloseDrawer() { + buttonContent.state = "collapsed" + } + } + + Connections { + target: ServersModel + + function onDefaultServerIndexChanged() { + updateDescriptions() + } + } + + Connections { + target: ContainersModel + + function onDefaultContainerChanged() { + updateDescriptions() + } + } + + function updateDescriptions() { + var description = "" + if (ServersModel.isDefaultServerHasWriteAccess()) { + if (SettingsController.isAmneziaDnsEnabled() + && ContainersModel.isAmneziaDnsContainerInstalled(ServersModel.getDefaultServerIndex())) { + description += "Amnezia DNS | " + } + } else { + if (ServersModel.isDefaultServerConfigContainsAmneziaDns()) { + description += "Amnezia DNS | " + } + } + + collapsedServerMenuDescription.text = description + root.defaultContainerName + " | " + root.defaultServerHostName + expandedServersMenuDescription.text = description + root.defaultServerHostName + } + + Component.onCompleted: updateDescriptions() + MouseArea { anchors.fill: parent enabled: buttonContent.state === "expanded" @@ -43,20 +92,6 @@ PageType { } } - Connections { - target: PageController - - function onRestorePageHomeState(isContainerInstalled) { - buttonContent.state = "expanded" - if (isContainerInstalled) { - containersDropDown.menuVisible = true - } - } - function onForceCloseDrawer() { - buttonContent.state = "collapsed" - } - } - MouseArea { id: dragArea @@ -255,26 +290,10 @@ PageType { } LabelTextType { + id: collapsedServerMenuDescription Layout.bottomMargin: 44 Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter visible: buttonContent.collapsedVisibility - - text: { - var description = "" - if (ServersModel.isDefaultServerHasWriteAccess()) { - if (SettingsController.isAmneziaDnsEnabled() - && ContainersModel.isAmneziaDnsContainerInstalled(ServersModel.getDefaultServerIndex())) { - description += "Amnezia DNS | " - } - } else { - if (ServersModel.isDefaultServerConfigContainsAmneziaDns()) { - description += "Amnezia DNS | " - } - } - - description += root.defaultContainerName + " | " + root.defaultServerHostName - return description - } } ColumnLayout { @@ -297,10 +316,11 @@ PageType { } LabelTextType { + id: expandedServersMenuDescription Layout.bottomMargin: 24 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - - text: root.defaultServerHostName + Layout.fillWidth: true + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter } RowLayout { @@ -450,11 +470,11 @@ PageType { if (hasWriteAccess) { if (SettingsController.isAmneziaDnsEnabled() && ContainersModel.isAmneziaDnsContainerInstalled(index)) { - description += "AmneziaDNS | " + description += "Amnezia DNS | " } } else { if (containsAmneziaDns) { - description += "AmneziaDNS | " + description += "Amnezia DNS | " } }