mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-23 02:00:20 +07:00
added display of all protocols in the settings after installing a new container
- set the app's max height and width to 600/800 - expanded the description when removing containers
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.25.0 FATAL_ERROR)
|
|||||||
|
|
||||||
set(PROJECT AmneziaVPN)
|
set(PROJECT AmneziaVPN)
|
||||||
|
|
||||||
project(${PROJECT} VERSION 4.0.3.1
|
project(${PROJECT} VERSION 4.0.4.1
|
||||||
DESCRIPTION "AmneziaVPN"
|
DESCRIPTION "AmneziaVPN"
|
||||||
HOMEPAGE_URL "https://amnezia.org/"
|
HOMEPAGE_URL "https://amnezia.org/"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -206,8 +206,8 @@ void AmneziaApplication::loadFonts()
|
|||||||
void AmneziaApplication::loadTranslator()
|
void AmneziaApplication::loadTranslator()
|
||||||
{
|
{
|
||||||
auto locale = m_settings->getAppLanguage();
|
auto locale = m_settings->getAppLanguage();
|
||||||
if (locale != QLocale::English) {
|
|
||||||
m_translator.reset(new QTranslator());
|
m_translator.reset(new QTranslator());
|
||||||
|
if (locale != QLocale::English) {
|
||||||
if (m_translator->load(locale, QString("amneziavpn"), QLatin1String("_"), QLatin1String(":/i18n"))) {
|
if (m_translator->load(locale, QString("amneziavpn"), QLatin1String("_"), QLatin1String(":/i18n"))) {
|
||||||
if (QCoreApplication::installTranslator(m_translator.get())) {
|
if (QCoreApplication::installTranslator(m_translator.get())) {
|
||||||
m_settings->setAppLanguage(locale);
|
m_settings->setAppLanguage(locale);
|
||||||
|
|||||||
@@ -59,20 +59,25 @@ InstallController::~InstallController()
|
|||||||
|
|
||||||
void InstallController::install(DockerContainer container, int port, TransportProto transportProto)
|
void InstallController::install(DockerContainer container, int port, TransportProto transportProto)
|
||||||
{
|
{
|
||||||
Proto mainProto = ContainerProps::defaultProtocol(container);
|
QJsonObject config;
|
||||||
|
auto mainProto = ContainerProps::defaultProtocol(container);
|
||||||
|
for (auto protocol : ContainerProps::protocolsForContainer(container)) {
|
||||||
QJsonObject containerConfig;
|
QJsonObject containerConfig;
|
||||||
|
|
||||||
|
if (protocol == mainProto) {
|
||||||
containerConfig.insert(config_key::port, QString::number(port));
|
containerConfig.insert(config_key::port, QString::number(port));
|
||||||
containerConfig.insert(config_key::transport_proto, ProtocolProps::transportProtoToString(transportProto, mainProto));
|
containerConfig.insert(config_key::transport_proto,
|
||||||
|
ProtocolProps::transportProtoToString(transportProto, protocol));
|
||||||
|
|
||||||
if (container == DockerContainer::Sftp) {
|
if (container == DockerContainer::Sftp) {
|
||||||
containerConfig.insert(config_key::userName, protocols::sftp::defaultUserName);
|
containerConfig.insert(config_key::userName, protocols::sftp::defaultUserName);
|
||||||
containerConfig.insert(config_key::password, Utils::getRandomString(10));
|
containerConfig.insert(config_key::password, Utils::getRandomString(10));
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject config;
|
|
||||||
config.insert(config_key::container, ContainerProps::containerToString(container));
|
config.insert(config_key::container, ContainerProps::containerToString(container));
|
||||||
config.insert(ProtocolProps::protoToString(mainProto), containerConfig);
|
}
|
||||||
|
config.insert(ProtocolProps::protoToString(protocol), containerConfig);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_shouldCreateServer) {
|
if (m_shouldCreateServer) {
|
||||||
if (isServerAlreadyExists()) {
|
if (isServerAlreadyExists()) {
|
||||||
|
|||||||
@@ -362,6 +362,7 @@ PageType {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
questionDrawer.headerText = qsTr("Remove OpenVpn from server?")
|
questionDrawer.headerText = qsTr("Remove OpenVpn from server?")
|
||||||
|
questionDrawer.descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it")
|
||||||
questionDrawer.yesButtonText = qsTr("Continue")
|
questionDrawer.yesButtonText = qsTr("Continue")
|
||||||
questionDrawer.noButtonText = qsTr("Cancel")
|
questionDrawer.noButtonText = qsTr("Cancel")
|
||||||
|
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ PageType {
|
|||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
questionDrawer.headerText = qsTr("Remove ") + ContainersModel.getCurrentlyProcessedContainerName() + qsTr(" from server?")
|
questionDrawer.headerText = qsTr("Remove ") + ContainersModel.getCurrentlyProcessedContainerName() + qsTr(" from server?")
|
||||||
|
questionDrawer.descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it")
|
||||||
questionDrawer.yesButtonText = qsTr("Continue")
|
questionDrawer.yesButtonText = qsTr("Continue")
|
||||||
questionDrawer.noButtonText = qsTr("Cancel")
|
questionDrawer.noButtonText = qsTr("Cancel")
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ PageType {
|
|||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
questionDrawer.headerText = qsTr("Remove ") + ContainersModel.getCurrentlyProcessedContainerName() + qsTr(" from server?")
|
questionDrawer.headerText = qsTr("Remove ") + ContainersModel.getCurrentlyProcessedContainerName() + qsTr(" from server?")
|
||||||
|
questionDrawer.descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it")
|
||||||
questionDrawer.yesButtonText = qsTr("Continue")
|
questionDrawer.yesButtonText = qsTr("Continue")
|
||||||
questionDrawer.noButtonText = qsTr("Cancel")
|
questionDrawer.noButtonText = qsTr("Cancel")
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ Window {
|
|||||||
height: GC.screenHeight
|
height: GC.screenHeight
|
||||||
minimumWidth: GC.isDesktop() ? 360 : 0
|
minimumWidth: GC.isDesktop() ? 360 : 0
|
||||||
minimumHeight: GC.isDesktop() ? 640 : 0
|
minimumHeight: GC.isDesktop() ? 640 : 0
|
||||||
|
maximumWidth: 600
|
||||||
|
maximumHeight: 800
|
||||||
|
|
||||||
color: "#0E0E11"
|
color: "#0E0E11"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user