Version 2.0.1

This commit is contained in:
pokamest 2021-11-19 23:04:35 +03:00
parent 2773d7598b
commit 9e7deecb99
5 changed files with 22 additions and 8 deletions

View file

@ -4,7 +4,7 @@
#define APPLICATION_NAME "AmneziaVPN"
#define SERVICE_NAME "AmneziaVPN-service"
#define ORGANIZATION_NAME "AmneziaVPN.ORG"
#define APP_MAJOR_VERSION "2.0.0"
#define APP_VERSION "2.0.0.0"
#define APP_MAJOR_VERSION "2.0.1"
#define APP_VERSION "2.0.1.0"
#endif // DEFINES_H

View file

@ -36,7 +36,9 @@ void ServerSettingsLogic::onUpdatePage()
.arg(port.isEmpty() ? "" : ":")
.arg(port));
set_lineEditDescriptionText(server.value(config_key::description).toString());
QString selectedContainerName = m_settings.defaultContainerName(uiLogic()->selectedServerIndex);
DockerContainer selectedContainer = m_settings.defaultContainer(uiLogic()->selectedServerIndex);
QString selectedContainerName = ContainerProps::containerHumanNames().value(selectedContainer);
set_labelCurrentVpnProtocolText(tr("Service: ") + selectedContainerName);
}

View file

@ -114,14 +114,23 @@ void StartPageLogic::onPushButtonConnect()
set_pushButtonConnectText(tr("Connect"));
uiLogic()->installCredentials = serverCredentials;
if (ok) uiLogic()->goToPage(Page::NewServer);
if (ok) emit uiLogic()->goToPage(Page::NewServer);
}
void StartPageLogic::onPushButtonImport()
{
QString s = lineEditStartExistingCodeText();
s.replace("vpn://", "");
QJsonObject o = QJsonDocument::fromJson(QByteArray::fromBase64(s.toUtf8(), QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals)).object();
QByteArray ba = QByteArray::fromBase64(s.toUtf8(), QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals);
QByteArray ba_uncompressed = qUncompress(ba);
QJsonObject o;
if (!ba_uncompressed.isEmpty()) {
o = QJsonDocument::fromBinaryData(ba_uncompressed).object();
}
else {
o = QJsonDocument::fromJson(ba).object();
}
ServerCredentials credentials;
credentials.hostName = o.value("h").toString();
@ -169,6 +178,8 @@ void StartPageLogic::onPushButtonImport()
if (!o.contains(config_key::containers)) {
uiLogic()->selectedServerIndex = m_settings.defaultServerIndex();
uiLogic()->selectedDockerContainer = m_settings.defaultContainer(uiLogic()->selectedServerIndex);
uiLogic()->goToPage(Page::ServerContainers);
uiLogic()->onUpdateAllPages();
emit uiLogic()->goToPage(Page::ServerContainers);
}
}

View file

@ -50,7 +50,8 @@ void VpnLogic::onUpdatePage()
.arg(server.value(config_key::hostName).toString());
set_labelCurrentServer(serverString);
QString selectedContainerName = m_settings.defaultContainerName(m_settings.defaultServerIndex());
DockerContainer selectedContainer = m_settings.defaultContainer(m_settings.defaultServerIndex());
QString selectedContainerName = ContainerProps::containerHumanNames().value(selectedContainer);
set_labelCurrentService(selectedContainerName);
}

View file

@ -124,7 +124,7 @@ New encryption keys pair will be generated.")
}
LabelType {
height: 20
Layout.fillWidth: true
text: qsTr("Config too long to be displayed as QR code")
visible: ShareConnectionLogic.shareAmneziaQrCodeText.length == 0 && tfShareCode.textArea.length > 0
}