Merge pull request #381 from amnezia-vpn/bugfix/minor-ui-fixes-4-version

Bugfix/minor UI fixes 4 version
This commit is contained in:
pokamest 2023-10-18 04:05:18 -07:00 committed by GitHub
commit de03435bac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 47 additions and 16 deletions

View file

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
set(PROJECT AmneziaVPN) set(PROJECT AmneziaVPN)
project(${PROJECT} VERSION 4.0.8.3 project(${PROJECT} VERSION 4.0.8.4
DESCRIPTION "AmneziaVPN" DESCRIPTION "AmneziaVPN"
HOMEPAGE_URL "https://amnezia.org/" HOMEPAGE_URL "https://amnezia.org/"
) )

View file

@ -286,6 +286,8 @@ void AmneziaApplication::initModels()
m_engine->rootContext()->setContextProperty("ServersModel", m_serversModel.get()); m_engine->rootContext()->setContextProperty("ServersModel", m_serversModel.get());
connect(m_serversModel.get(), &ServersModel::currentlyProcessedServerIndexChanged, m_containersModel.get(), connect(m_serversModel.get(), &ServersModel::currentlyProcessedServerIndexChanged, m_containersModel.get(),
&ContainersModel::setCurrentlyProcessedServerIndex); &ContainersModel::setCurrentlyProcessedServerIndex);
connect(m_serversModel.get(), &ServersModel::defaultServerIndexChanged, m_containersModel.get(),
&ContainersModel::setCurrentlyProcessedServerIndex);
m_languageModel.reset(new LanguageModel(m_settings, this)); m_languageModel.reset(new LanguageModel(m_settings, this));
m_engine->rootContext()->setContextProperty("LanguageModel", m_languageModel.get()); m_engine->rootContext()->setContextProperty("LanguageModel", m_languageModel.get());

View file

@ -4,7 +4,7 @@
<context> <context>
<name>AmneziaApplication</name> <name>AmneziaApplication</name>
<message> <message>
<location filename="../amnezia_application.cpp" line="302"/> <location filename="../amnezia_application.cpp" line="304"/>
<source>Split tunneling for WireGuard is not implemented, the option was disabled</source> <source>Split tunneling for WireGuard is not implemented, the option was disabled</source>
<translation>Раздельное туннелирование для &quot;Wireguard&quot; не реализовано,опция отключена</translation> <translation>Раздельное туннелирование для &quot;Wireguard&quot; не реализовано,опция отключена</translation>
</message> </message>
@ -194,7 +194,7 @@ Already installed containers were found on the server. All installed containers
<translation>Пожалуйста, войдите в систему от имени пользователя</translation> <translation>Пожалуйста, войдите в систему от имени пользователя</translation>
</message> </message>
<message> <message>
<location filename="../ui/controllers/installController.cpp" line="481"/> <location filename="../ui/controllers/installController.cpp" line="483"/>
<source>Server added successfully</source> <source>Server added successfully</source>
<translation>Сервер успешно добавлен</translation> <translation>Сервер успешно добавлен</translation>
</message> </message>
@ -262,17 +262,17 @@ Already installed containers were found on the server. All installed containers
<context> <context>
<name>PageHome</name> <name>PageHome</name>
<message> <message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="344"/> <location filename="../ui/qml/Pages2/PageHome.qml" line="354"/>
<source>VPN protocol</source> <source>VPN protocol</source>
<translation>VPN протокол</translation> <translation>VPN протокол</translation>
</message> </message>
<message> <message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="388"/> <location filename="../ui/qml/Pages2/PageHome.qml" line="398"/>
<source>Servers</source> <source>Servers</source>
<translation>Серверы</translation> <translation>Серверы</translation>
</message> </message>
<message> <message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="480"/> <location filename="../ui/qml/Pages2/PageHome.qml" line="490"/>
<source>Unable change server while there is an active connection</source> <source>Unable change server while there is an active connection</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View file

@ -4,7 +4,7 @@
<context> <context>
<name>AmneziaApplication</name> <name>AmneziaApplication</name>
<message> <message>
<location filename="../amnezia_application.cpp" line="302"/> <location filename="../amnezia_application.cpp" line="304"/>
<source>Split tunneling for WireGuard is not implemented, the option was disabled</source> <source>Split tunneling for WireGuard is not implemented, the option was disabled</source>
<translation>WireGuard协议的VPN分离</translation> <translation>WireGuard协议的VPN分离</translation>
</message> </message>
@ -228,7 +228,7 @@ Already installed containers were found on the server. All installed containers
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/controllers/installController.cpp" line="481"/> <location filename="../ui/controllers/installController.cpp" line="483"/>
<source>Server added successfully</source> <source>Server added successfully</source>
<translation></translation> <translation></translation>
</message> </message>
@ -296,17 +296,17 @@ Already installed containers were found on the server. All installed containers
<context> <context>
<name>PageHome</name> <name>PageHome</name>
<message> <message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="344"/> <location filename="../ui/qml/Pages2/PageHome.qml" line="354"/>
<source>VPN protocol</source> <source>VPN protocol</source>
<translation>VPN协议</translation> <translation>VPN协议</translation>
</message> </message>
<message> <message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="388"/> <location filename="../ui/qml/Pages2/PageHome.qml" line="398"/>
<source>Servers</source> <source>Servers</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="480"/> <location filename="../ui/qml/Pages2/PageHome.qml" line="490"/>
<source>Unable change server while there is an active connection</source> <source>Unable change server while there is an active connection</source>
<translation>Невозможно изменить сервер при наличии активного соединения</translation> <translation>Невозможно изменить сервер при наличии активного соединения</translation>
</message> </message>

View file

@ -475,6 +475,8 @@ void InstallController::addEmptyServer()
server.insert(config_key::port, m_currentlyInstalledServerCredentials.port); server.insert(config_key::port, m_currentlyInstalledServerCredentials.port);
server.insert(config_key::description, m_settings->nextAvailableServerName()); server.insert(config_key::description, m_settings->nextAvailableServerName());
server.insert(config_key::defaultContainer, ContainerProps::containerToString(DockerContainer::None));
m_serversModel->addServer(server); m_serversModel->addServer(server);
m_serversModel->setDefaultServerIndex(m_serversModel->getServersCount() - 1); m_serversModel->setDefaultServerIndex(m_serversModel->getServersCount() - 1);

View file

@ -96,7 +96,7 @@ void ServersModel::setDefaultServerIndex(const int index)
{ {
m_settings->setDefaultServer(index); m_settings->setDefaultServer(index);
m_defaultServerIndex = m_settings->defaultServerIndex(); m_defaultServerIndex = m_settings->defaultServerIndex();
emit defaultServerIndexChanged(); emit defaultServerIndexChanged(m_defaultServerIndex);
} }
const int ServersModel::getDefaultServerIndex() const int ServersModel::getDefaultServerIndex()

View file

@ -64,7 +64,7 @@ protected:
signals: signals:
void currentlyProcessedServerIndexChanged(const int index); void currentlyProcessedServerIndexChanged(const int index);
void defaultServerIndexChanged(); void defaultServerIndexChanged(const int index);
void defaultServerNameChanged(); void defaultServerNameChanged();
private: private:

View file

@ -142,6 +142,7 @@ Button {
PageController.setTriggeredBtConnectButton(true) PageController.setTriggeredBtConnectButton(true)
ServersModel.currentlyProcessedIndex = ServersModel.getDefaultServerIndex() ServersModel.currentlyProcessedIndex = ServersModel.getDefaultServerIndex()
InstallController.setShouldCreateServer(false)
PageController.goToPage(PageEnum.PageSetupWizardEasy) PageController.goToPage(PageEnum.PageSetupWizardEasy)
return return

View file

@ -17,9 +17,11 @@ DrawerType {
property var noButtonFunction property var noButtonFunction
width: parent.width width: parent.width
height: parent.height * 0.5 height: content.implicitHeight + 32
ColumnLayout { ColumnLayout {
id: content
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right

View file

@ -1,6 +1,8 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import "../Config"
Drawer { Drawer {
id: drawer id: drawer
property bool needCloseButton: true property bool needCloseButton: true
@ -39,6 +41,18 @@ Drawer {
border.color: "#2C2D30" border.color: "#2C2D30"
border.width: 1 border.width: 1
Rectangle {
visible: GC.isMobile()
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
anchors.topMargin: 10
width: 20
height: 2
color: "#2C2D30"
}
} }
Overlay.modal: Rectangle { Overlay.modal: Rectangle {

View file

@ -241,8 +241,18 @@ PageType {
} }
] ]
DividerType {
Layout.topMargin: 10
Layout.fillWidth: false
Layout.preferredWidth: 20
Layout.preferredHeight: 2
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
visible: (buttonContent.collapsedVisibility || buttonContent.expandedVisibility)
}
RowLayout { RowLayout {
Layout.topMargin: 24 Layout.topMargin: 14
Layout.leftMargin: 24 Layout.leftMargin: 24
Layout.rightMargin: 24 Layout.rightMargin: 24
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
@ -305,7 +315,7 @@ PageType {
Header1TextType { Header1TextType {
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 24 Layout.topMargin: 14
Layout.leftMargin: 16 Layout.leftMargin: 16
Layout.rightMargin: 16 Layout.rightMargin: 16