Version 2.0.1
This commit is contained in:
parent
2773d7598b
commit
9e7deecb99
5 changed files with 22 additions and 8 deletions
|
@ -4,7 +4,7 @@
|
||||||
#define APPLICATION_NAME "AmneziaVPN"
|
#define APPLICATION_NAME "AmneziaVPN"
|
||||||
#define SERVICE_NAME "AmneziaVPN-service"
|
#define SERVICE_NAME "AmneziaVPN-service"
|
||||||
#define ORGANIZATION_NAME "AmneziaVPN.ORG"
|
#define ORGANIZATION_NAME "AmneziaVPN.ORG"
|
||||||
#define APP_MAJOR_VERSION "2.0.0"
|
#define APP_MAJOR_VERSION "2.0.1"
|
||||||
#define APP_VERSION "2.0.0.0"
|
#define APP_VERSION "2.0.1.0"
|
||||||
|
|
||||||
#endif // DEFINES_H
|
#endif // DEFINES_H
|
||||||
|
|
|
@ -36,7 +36,9 @@ void ServerSettingsLogic::onUpdatePage()
|
||||||
.arg(port.isEmpty() ? "" : ":")
|
.arg(port.isEmpty() ? "" : ":")
|
||||||
.arg(port));
|
.arg(port));
|
||||||
set_lineEditDescriptionText(server.value(config_key::description).toString());
|
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);
|
set_labelCurrentVpnProtocolText(tr("Service: ") + selectedContainerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,14 +114,23 @@ void StartPageLogic::onPushButtonConnect()
|
||||||
set_pushButtonConnectText(tr("Connect"));
|
set_pushButtonConnectText(tr("Connect"));
|
||||||
|
|
||||||
uiLogic()->installCredentials = serverCredentials;
|
uiLogic()->installCredentials = serverCredentials;
|
||||||
if (ok) uiLogic()->goToPage(Page::NewServer);
|
if (ok) emit uiLogic()->goToPage(Page::NewServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartPageLogic::onPushButtonImport()
|
void StartPageLogic::onPushButtonImport()
|
||||||
{
|
{
|
||||||
QString s = lineEditStartExistingCodeText();
|
QString s = lineEditStartExistingCodeText();
|
||||||
s.replace("vpn://", "");
|
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;
|
ServerCredentials credentials;
|
||||||
credentials.hostName = o.value("h").toString();
|
credentials.hostName = o.value("h").toString();
|
||||||
|
@ -169,6 +178,8 @@ void StartPageLogic::onPushButtonImport()
|
||||||
if (!o.contains(config_key::containers)) {
|
if (!o.contains(config_key::containers)) {
|
||||||
uiLogic()->selectedServerIndex = m_settings.defaultServerIndex();
|
uiLogic()->selectedServerIndex = m_settings.defaultServerIndex();
|
||||||
uiLogic()->selectedDockerContainer = m_settings.defaultContainer(uiLogic()->selectedServerIndex);
|
uiLogic()->selectedDockerContainer = m_settings.defaultContainer(uiLogic()->selectedServerIndex);
|
||||||
uiLogic()->goToPage(Page::ServerContainers);
|
uiLogic()->onUpdateAllPages();
|
||||||
|
|
||||||
|
emit uiLogic()->goToPage(Page::ServerContainers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,8 @@ void VpnLogic::onUpdatePage()
|
||||||
.arg(server.value(config_key::hostName).toString());
|
.arg(server.value(config_key::hostName).toString());
|
||||||
set_labelCurrentServer(serverString);
|
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);
|
set_labelCurrentService(selectedContainerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ New encryption keys pair will be generated.")
|
||||||
}
|
}
|
||||||
|
|
||||||
LabelType {
|
LabelType {
|
||||||
height: 20
|
Layout.fillWidth: true
|
||||||
text: qsTr("Config too long to be displayed as QR code")
|
text: qsTr("Config too long to be displayed as QR code")
|
||||||
visible: ShareConnectionLogic.shareAmneziaQrCodeText.length == 0 && tfShareCode.textArea.length > 0
|
visible: ShareConnectionLogic.shareAmneziaQrCodeText.length == 0 && tfShareCode.textArea.length > 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue