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)
project(${PROJECT} VERSION 4.0.8.3
project(${PROJECT} VERSION 4.0.8.4
DESCRIPTION "AmneziaVPN"
HOMEPAGE_URL "https://amnezia.org/"
)

View file

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

View file

@ -4,7 +4,7 @@
<context>
<name>AmneziaApplication</name>
<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>
<translation>Раздельное туннелирование для &quot;Wireguard&quot; не реализовано,опция отключена</translation>
</message>
@ -194,7 +194,7 @@ Already installed containers were found on the server. All installed containers
<translation>Пожалуйста, войдите в систему от имени пользователя</translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="481"/>
<location filename="../ui/controllers/installController.cpp" line="483"/>
<source>Server added successfully</source>
<translation>Сервер успешно добавлен</translation>
</message>
@ -262,17 +262,17 @@ Already installed containers were found on the server. All installed containers
<context>
<name>PageHome</name>
<message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="344"/>
<location filename="../ui/qml/Pages2/PageHome.qml" line="354"/>
<source>VPN protocol</source>
<translation>VPN протокол</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="388"/>
<location filename="../ui/qml/Pages2/PageHome.qml" line="398"/>
<source>Servers</source>
<translation>Серверы</translation>
</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>
<translation type="unfinished"></translation>
</message>

View file

@ -4,7 +4,7 @@
<context>
<name>AmneziaApplication</name>
<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>
<translation>WireGuard协议的VPN分离</translation>
</message>
@ -228,7 +228,7 @@ Already installed containers were found on the server. All installed containers
<translation></translation>
</message>
<message>
<location filename="../ui/controllers/installController.cpp" line="481"/>
<location filename="../ui/controllers/installController.cpp" line="483"/>
<source>Server added successfully</source>
<translation></translation>
</message>
@ -296,17 +296,17 @@ Already installed containers were found on the server. All installed containers
<context>
<name>PageHome</name>
<message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="344"/>
<location filename="../ui/qml/Pages2/PageHome.qml" line="354"/>
<source>VPN protocol</source>
<translation>VPN协议</translation>
</message>
<message>
<location filename="../ui/qml/Pages2/PageHome.qml" line="388"/>
<location filename="../ui/qml/Pages2/PageHome.qml" line="398"/>
<source>Servers</source>
<translation></translation>
</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>
<translation>Невозможно изменить сервер при наличии активного соединения</translation>
</message>

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,8 @@
import QtQuick
import QtQuick.Controls
import "../Config"
Drawer {
id: drawer
property bool needCloseButton: true
@ -39,6 +41,18 @@ Drawer {
border.color: "#2C2D30"
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 {

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 {
Layout.topMargin: 24
Layout.topMargin: 14
Layout.leftMargin: 24
Layout.rightMargin: 24
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
@ -305,7 +315,7 @@ PageType {
Header1TextType {
Layout.fillWidth: true
Layout.topMargin: 24
Layout.topMargin: 14
Layout.leftMargin: 16
Layout.rightMargin: 16