Merge branch 'dev' into feature/amnezia-wireguard-client-impl
This commit is contained in:
commit
135726f177
52 changed files with 4380 additions and 2197 deletions
|
@ -50,10 +50,29 @@ endif()
|
||||||
|
|
||||||
qt6_add_resources(QRC ${QRC} ${CMAKE_CURRENT_LIST_DIR}/resources.qrc)
|
qt6_add_resources(QRC ${QRC} ${CMAKE_CURRENT_LIST_DIR}/resources.qrc)
|
||||||
|
|
||||||
qt6_add_translations(${PROJECT} TS_FILES
|
# -- i18n begin
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
set(AMNEZIAVPN_TS_FILES
|
||||||
${CMAKE_CURRENT_LIST_DIR}/translations/amneziavpn_ru.ts
|
${CMAKE_CURRENT_LIST_DIR}/translations/amneziavpn_ru.ts
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/translations/amneziavpn_zh_CN.ts
|
||||||
)
|
)
|
||||||
|
|
||||||
|
file(GLOB_RECURSE AMNEZIAVPN_TS_SOURCES *.qrc *.cpp *.h *.ui)
|
||||||
|
|
||||||
|
qt_create_translation(AMNEZIAVPN_QM_FILES ${AMNEZIAVPN_TS_SOURCES} ${AMNEZIAVPN_TS_FILES})
|
||||||
|
|
||||||
|
set(QM_FILE_LIST "")
|
||||||
|
foreach(FILE ${AMNEZIAVPN_QM_FILES})
|
||||||
|
get_filename_component(QM_FILE_NAME ${FILE} NAME)
|
||||||
|
list(APPEND QM_FILE_LIST "<file>${QM_FILE_NAME}</file>")
|
||||||
|
endforeach()
|
||||||
|
string(REPLACE ";" "" QM_FILE_LIST ${QM_FILE_LIST})
|
||||||
|
|
||||||
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/translations/translations.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
|
||||||
|
qt6_add_resources(QRC ${I18NQRC} ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)
|
||||||
|
# -- i18n end
|
||||||
|
|
||||||
if(IOS)
|
if(IOS)
|
||||||
#execute_process(COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/scripts/run-build-cloak.sh)
|
#execute_process(COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/scripts/run-build-cloak.sh)
|
||||||
execute_process(COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/ios/scripts/openvpn.sh args
|
execute_process(COMMAND bash ${CMAKE_CURRENT_LIST_DIR}/ios/scripts/openvpn.sh args
|
||||||
|
@ -324,5 +343,5 @@ if(NOT IOS AND NOT ANDROID)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources(${PROJECT} PRIVATE ${SOURCES} ${HEADERS} ${RESOURCES} ${QRC})
|
target_sources(${PROJECT} PRIVATE ${SOURCES} ${HEADERS} ${RESOURCES} ${QRC} ${I18NQRC})
|
||||||
qt_finalize_target(${PROJECT})
|
qt_finalize_target(${PROJECT})
|
||||||
|
|
|
@ -87,6 +87,7 @@ void AmneziaApplication::init()
|
||||||
m_vpnConnectionThread.start();
|
m_vpnConnectionThread.start();
|
||||||
|
|
||||||
initModels();
|
initModels();
|
||||||
|
loadTranslator();
|
||||||
initControllers();
|
initControllers();
|
||||||
|
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
|
@ -138,6 +139,7 @@ void AmneziaApplication::init()
|
||||||
&ConnectionController::openConnection);
|
&ConnectionController::openConnection);
|
||||||
connect(m_notificationHandler.get(), &NotificationHandler::disconnectRequested, m_connectionController.get(),
|
connect(m_notificationHandler.get(), &NotificationHandler::disconnectRequested, m_connectionController.get(),
|
||||||
&ConnectionController::closeConnection);
|
&ConnectionController::closeConnection);
|
||||||
|
connect(this, &AmneziaApplication::translationsUpdated, m_notificationHandler.get(), &NotificationHandler::onTranslationsUpdated);
|
||||||
|
|
||||||
m_engine->load(url);
|
m_engine->load(url);
|
||||||
m_systemController->setQmlRoot(m_engine->rootObjects().value(0));
|
m_systemController->setQmlRoot(m_engine->rootObjects().value(0));
|
||||||
|
@ -221,34 +223,27 @@ void AmneziaApplication::loadTranslator()
|
||||||
{
|
{
|
||||||
auto locale = m_settings->getAppLanguage();
|
auto locale = m_settings->getAppLanguage();
|
||||||
m_translator.reset(new QTranslator());
|
m_translator.reset(new QTranslator());
|
||||||
if (locale != QLocale::English) {
|
updateTranslator(locale);
|
||||||
if (m_translator->load(locale, QString("amneziavpn"), QLatin1String("_"), QLatin1String(":/i18n"))) {
|
|
||||||
if (QCoreApplication::installTranslator(m_translator.get())) {
|
|
||||||
m_settings->setAppLanguage(locale);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AmneziaApplication::updateTranslator(const QLocale &locale)
|
void AmneziaApplication::updateTranslator(const QLocale &locale)
|
||||||
{
|
{
|
||||||
QResource::registerResource(":/translations.qrc");
|
if (!m_translator->isEmpty()) {
|
||||||
if (!m_translator->isEmpty())
|
|
||||||
QCoreApplication::removeTranslator(m_translator.get());
|
QCoreApplication::removeTranslator(m_translator.get());
|
||||||
|
|
||||||
if (locale == QLocale::English) {
|
|
||||||
m_settings->setAppLanguage(locale);
|
|
||||||
m_engine->retranslate();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_translator->load(locale, QString("amneziavpn"), QLatin1String("_"), QLatin1String(":/i18n"))) {
|
QString strFileName = QString(":/translations/amneziavpn")+QLatin1String("_")+locale.name()+".qm";
|
||||||
|
if (m_translator->load(strFileName)) {
|
||||||
if (QCoreApplication::installTranslator(m_translator.get())) {
|
if (QCoreApplication::installTranslator(m_translator.get())) {
|
||||||
m_settings->setAppLanguage(locale);
|
m_settings->setAppLanguage(locale);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
m_engine->retranslate();
|
m_settings->setAppLanguage(QLocale::English);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_engine->retranslate();
|
||||||
|
|
||||||
emit translationsUpdated();
|
emit translationsUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -338,6 +333,8 @@ void AmneziaApplication::initControllers()
|
||||||
m_connectionController.reset(new ConnectionController(m_serversModel, m_containersModel, m_vpnConnection));
|
m_connectionController.reset(new ConnectionController(m_serversModel, m_containersModel, m_vpnConnection));
|
||||||
m_engine->rootContext()->setContextProperty("ConnectionController", m_connectionController.get());
|
m_engine->rootContext()->setContextProperty("ConnectionController", m_connectionController.get());
|
||||||
|
|
||||||
|
connect(this, &AmneziaApplication::translationsUpdated, m_connectionController.get(), &ConnectionController::onTranslationsUpdated);
|
||||||
|
|
||||||
m_pageController.reset(new PageController(m_serversModel, m_settings));
|
m_pageController.reset(new PageController(m_serversModel, m_settings));
|
||||||
m_engine->rootContext()->setContextProperty("PageController", m_pageController.get());
|
m_engine->rootContext()->setContextProperty("PageController", m_pageController.get());
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@ int main(int argc, char *argv[])
|
||||||
app.setOrganizationName(ORGANIZATION_NAME);
|
app.setOrganizationName(ORGANIZATION_NAME);
|
||||||
app.setApplicationDisplayName(APPLICATION_NAME);
|
app.setApplicationDisplayName(APPLICATION_NAME);
|
||||||
|
|
||||||
app.loadTranslator();
|
|
||||||
app.loadFonts();
|
app.loadFonts();
|
||||||
|
|
||||||
bool doExec = app.parseCommands();
|
bool doExec = app.parseCommands();
|
||||||
|
|
|
@ -101,8 +101,6 @@ void WireguardProtocol::stop()
|
||||||
#if defined(Q_OS_MAC) || defined(Q_OS_WIN) || defined(Q_OS_LINUX)
|
#if defined(Q_OS_MAC) || defined(Q_OS_WIN) || defined(Q_OS_LINUX)
|
||||||
ErrorCode WireguardProtocol::startMzImpl()
|
ErrorCode WireguardProtocol::startMzImpl()
|
||||||
{
|
{
|
||||||
|
|
||||||
qDebug() << "WireguardProtocol::startMzImpl():" << m_rawConfig;
|
|
||||||
m_impl->activate(m_rawConfig);
|
m_impl->activate(m_rawConfig);
|
||||||
return ErrorCode::NoError;
|
return ErrorCode::NoError;
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,6 +178,15 @@ public:
|
||||||
m_settings.setValue("Conf/appLanguage", locale);
|
m_settings.setValue("Conf/appLanguage", locale);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool isScreenshotsEnabled() const
|
||||||
|
{
|
||||||
|
return m_settings.value("Conf/screenshotsEnabled", false).toBool();
|
||||||
|
}
|
||||||
|
void setScreenshotsEnabled(bool enabled)
|
||||||
|
{
|
||||||
|
m_settings.setValue("Conf/screenshotsEnabled", enabled);
|
||||||
|
}
|
||||||
|
|
||||||
void clearSettings();
|
void clearSettings();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
File diff suppressed because it is too large
Load diff
2725
client/translations/amneziavpn_zh_CN.ts
Normal file
2725
client/translations/amneziavpn_zh_CN.ts
Normal file
File diff suppressed because it is too large
Load diff
5
client/translations/translations.qrc.in
Normal file
5
client/translations/translations.qrc.in
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/translations">
|
||||||
|
@QM_FILE_LIST@
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
|
@ -19,23 +19,8 @@ ConnectionController::ConnectionController(const QSharedPointer<ServersModel> &s
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
connect(this, &ConnectionController::disconnectFromVpn, m_vpnConnection.get(), &VpnConnection::disconnectFromVpn,
|
connect(this, &ConnectionController::disconnectFromVpn, m_vpnConnection.get(), &VpnConnection::disconnectFromVpn,
|
||||||
Qt::QueuedConnection);
|
Qt::QueuedConnection);
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionController::~ConnectionController()
|
m_state = Vpn::ConnectionState::Disconnected;
|
||||||
{
|
|
||||||
// todo use ConnectionController instead of using m_vpnConnection directly
|
|
||||||
#ifdef AMNEZIA_DESKTOP
|
|
||||||
if (m_vpnConnection->connectionState() != Vpn::ConnectionState::Disconnected) {
|
|
||||||
m_vpnConnection->disconnectFromVpn();
|
|
||||||
for (int i = 0; i < 50; i++) {
|
|
||||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
|
|
||||||
QThread::msleep(100);
|
|
||||||
if (m_vpnConnection->isDisconnected()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionController::openConnection()
|
void ConnectionController::openConnection()
|
||||||
|
@ -70,6 +55,8 @@ QString ConnectionController::getLastConnectionError()
|
||||||
|
|
||||||
void ConnectionController::onConnectionStateChanged(Vpn::ConnectionState state)
|
void ConnectionController::onConnectionStateChanged(Vpn::ConnectionState state)
|
||||||
{
|
{
|
||||||
|
m_state = state;
|
||||||
|
|
||||||
m_isConnected = false;
|
m_isConnected = false;
|
||||||
m_connectionStateText = tr("Connection...");
|
m_connectionStateText = tr("Connection...");
|
||||||
switch (state) {
|
switch (state) {
|
||||||
|
@ -126,6 +113,17 @@ void ConnectionController::onCurrentContainerUpdated()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConnectionController::onTranslationsUpdated()
|
||||||
|
{
|
||||||
|
// get translated text of current state
|
||||||
|
onConnectionStateChanged(getCurrentConnectionState());
|
||||||
|
}
|
||||||
|
|
||||||
|
Vpn::ConnectionState ConnectionController::getCurrentConnectionState()
|
||||||
|
{
|
||||||
|
return m_state;
|
||||||
|
}
|
||||||
|
|
||||||
QString ConnectionController::connectionStateText() const
|
QString ConnectionController::connectionStateText() const
|
||||||
{
|
{
|
||||||
return m_connectionStateText;
|
return m_connectionStateText;
|
||||||
|
|
|
@ -19,7 +19,7 @@ public:
|
||||||
const QSharedPointer<ContainersModel> &containersModel,
|
const QSharedPointer<ContainersModel> &containersModel,
|
||||||
const QSharedPointer<VpnConnection> &vpnConnection, QObject *parent = nullptr);
|
const QSharedPointer<VpnConnection> &vpnConnection, QObject *parent = nullptr);
|
||||||
|
|
||||||
~ConnectionController();
|
~ConnectionController() = default;
|
||||||
|
|
||||||
bool isConnected() const;
|
bool isConnected() const;
|
||||||
bool isConnectionInProgress() const;
|
bool isConnectionInProgress() const;
|
||||||
|
@ -34,6 +34,8 @@ public slots:
|
||||||
|
|
||||||
void onCurrentContainerUpdated();
|
void onCurrentContainerUpdated();
|
||||||
|
|
||||||
|
void onTranslationsUpdated();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void connectToVpn(int serverIndex, const ServerCredentials &credentials, DockerContainer container,
|
void connectToVpn(int serverIndex, const ServerCredentials &credentials, DockerContainer container,
|
||||||
const QJsonObject &containerConfig);
|
const QJsonObject &containerConfig);
|
||||||
|
@ -44,6 +46,8 @@ signals:
|
||||||
void reconnectWithUpdatedContainer(const QString &message);
|
void reconnectWithUpdatedContainer(const QString &message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Vpn::ConnectionState getCurrentConnectionState();
|
||||||
|
|
||||||
QSharedPointer<ServersModel> m_serversModel;
|
QSharedPointer<ServersModel> m_serversModel;
|
||||||
QSharedPointer<ContainersModel> m_containersModel;
|
QSharedPointer<ContainersModel> m_containersModel;
|
||||||
|
|
||||||
|
@ -52,6 +56,8 @@ private:
|
||||||
bool m_isConnected = false;
|
bool m_isConnected = false;
|
||||||
bool m_isConnectionInProgress = false;
|
bool m_isConnectionInProgress = false;
|
||||||
QString m_connectionStateText = tr("Connect");
|
QString m_connectionStateText = tr("Connect");
|
||||||
|
|
||||||
|
Vpn::ConnectionState m_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CONNECTIONCONTROLLER_H
|
#endif // CONNECTIONCONTROLLER_H
|
||||||
|
|
|
@ -61,15 +61,6 @@ ImportController::ImportController(const QSharedPointer<ServersModel> &serversMo
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_ANDROID
|
#ifdef Q_OS_ANDROID
|
||||||
mInstance = this;
|
mInstance = this;
|
||||||
// Set security screen for Android app
|
|
||||||
AndroidUtils::runOnAndroidThreadSync([]() {
|
|
||||||
QJniObject activity = AndroidUtils::getActivity();
|
|
||||||
QJniObject window = activity.callObjectMethod("getWindow", "()Landroid/view/Window;");
|
|
||||||
if (window.isValid()) {
|
|
||||||
const int FLAG_SECURE = 8192;
|
|
||||||
window.callMethod<void>("addFlags", "(I)V", FLAG_SECURE);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
AndroidUtils::runOnAndroidThreadAsync([]() {
|
AndroidUtils::runOnAndroidThreadAsync([]() {
|
||||||
JNINativeMethod methods[] {
|
JNINativeMethod methods[] {
|
||||||
|
|
|
@ -107,14 +107,12 @@ void InstallController::installServer(DockerContainer container, QJsonObject &co
|
||||||
if (!installedContainers.contains(container)) {
|
if (!installedContainers.contains(container)) {
|
||||||
errorCode = serverController.setupContainer(m_currentlyInstalledServerCredentials, container, config);
|
errorCode = serverController.setupContainer(m_currentlyInstalledServerCredentials, container, config);
|
||||||
installedContainers.insert(container, config);
|
installedContainers.insert(container, config);
|
||||||
finishMessage = ContainerProps::containerHumanNames().value(container) + tr(" installed successfully. ");
|
finishMessage = tr("%1 installed successfully. ").arg(ContainerProps::containerHumanNames().value(container));
|
||||||
} else {
|
} else {
|
||||||
finishMessage =
|
finishMessage = tr("%1 is already installed on the server. ").arg(ContainerProps::containerHumanNames().value(container));
|
||||||
ContainerProps::containerHumanNames().value(container) + tr(" is already installed on the server. ");
|
|
||||||
}
|
}
|
||||||
if (installedContainers.size() > 1) {
|
if (installedContainers.size() > 1) {
|
||||||
finishMessage += tr("\nAlready installed containers were found on the server. "
|
finishMessage += tr("\nAdded containers that were already installed on the server");
|
||||||
"All installed containers have been added to the application");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errorCode == ErrorCode::NoError) {
|
if (errorCode == ErrorCode::NoError) {
|
||||||
|
@ -160,10 +158,9 @@ void InstallController::installContainer(DockerContainer container, QJsonObject
|
||||||
if (!installedContainers.contains(container)) {
|
if (!installedContainers.contains(container)) {
|
||||||
errorCode = serverController.setupContainer(serverCredentials, container, config);
|
errorCode = serverController.setupContainer(serverCredentials, container, config);
|
||||||
installedContainers.insert(container, config);
|
installedContainers.insert(container, config);
|
||||||
finishMessage = ContainerProps::containerHumanNames().value(container) + tr(" installed successfully. ");
|
finishMessage = tr("%1 installed successfully. ").arg(ContainerProps::containerHumanNames().value(container));
|
||||||
} else {
|
} else {
|
||||||
finishMessage =
|
finishMessage = tr("%1 is already installed on the server. ").arg(ContainerProps::containerHumanNames().value(container));
|
||||||
ContainerProps::containerHumanNames().value(container) + tr(" is already installed on the server. ");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isInstalledContainerAddedToGui = false;
|
bool isInstalledContainerAddedToGui = false;
|
||||||
|
@ -278,7 +275,7 @@ void InstallController::removeCurrentlyProcessedServer()
|
||||||
QString serverName = m_serversModel->data(serverIndex, ServersModel::Roles::NameRole).toString();
|
QString serverName = m_serversModel->data(serverIndex, ServersModel::Roles::NameRole).toString();
|
||||||
|
|
||||||
m_serversModel->removeServer();
|
m_serversModel->removeServer();
|
||||||
emit removeCurrentlyProcessedServerFinished(tr("Server '") + serverName + tr("' was removed"));
|
emit removeCurrentlyProcessedServerFinished(tr("Server '%1' was removed").arg(serverName));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InstallController::removeAllContainers()
|
void InstallController::removeAllContainers()
|
||||||
|
@ -288,7 +285,7 @@ void InstallController::removeAllContainers()
|
||||||
|
|
||||||
ErrorCode errorCode = m_containersModel->removeAllContainers();
|
ErrorCode errorCode = m_containersModel->removeAllContainers();
|
||||||
if (errorCode == ErrorCode::NoError) {
|
if (errorCode == ErrorCode::NoError) {
|
||||||
emit removeAllContainersFinished(tr("All containers from server '") + serverName + ("' have been removed"));
|
emit removeAllContainersFinished(tr("All containers from server '%1' have been removed").arg(serverName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit installationErrorOccurred(errorString(errorCode));
|
emit installationErrorOccurred(errorString(errorCode));
|
||||||
|
@ -304,8 +301,8 @@ void InstallController::removeCurrentlyProcessedContainer()
|
||||||
|
|
||||||
ErrorCode errorCode = m_containersModel->removeCurrentlyProcessedContainer();
|
ErrorCode errorCode = m_containersModel->removeCurrentlyProcessedContainer();
|
||||||
if (errorCode == ErrorCode::NoError) {
|
if (errorCode == ErrorCode::NoError) {
|
||||||
emit removeCurrentlyProcessedContainerFinished(containerName + tr(" has been removed from the server '")
|
|
||||||
+ serverName + "'");
|
emit removeCurrentlyProcessedContainerFinished(tr("%1 has been removed from the server '%2'").arg(containerName).arg(serverName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
emit installationErrorOccurred(errorString(errorCode));
|
emit installationErrorOccurred(errorString(errorCode));
|
||||||
|
|
|
@ -37,6 +37,8 @@ PageController::PageController(const QSharedPointer<ServersModel> &serversModel,
|
||||||
connect(this, &PageController::raiseMainWindow, []() { setDockIconVisible(true); });
|
connect(this, &PageController::raiseMainWindow, []() { setDockIconVisible(true); });
|
||||||
connect(this, &PageController::hideMainWindow, []() { setDockIconVisible(false); });
|
connect(this, &PageController::hideMainWindow, []() { setDockIconVisible(false); });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
m_isTriggeredByConnectButton = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PageController::getInitialPage()
|
QString PageController::getInitialPage()
|
||||||
|
@ -145,3 +147,13 @@ void PageController::drawerClose()
|
||||||
m_drawerLayer = 0;
|
m_drawerLayer = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PageController::isTriggeredByConnectButton()
|
||||||
|
{
|
||||||
|
return m_isTriggeredByConnectButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PageController::setTriggeredBtConnectButton(bool trigger)
|
||||||
|
{
|
||||||
|
m_isTriggeredByConnectButton = trigger;
|
||||||
|
}
|
||||||
|
|
|
@ -85,6 +85,10 @@ public slots:
|
||||||
void drawerOpen();
|
void drawerOpen();
|
||||||
void drawerClose();
|
void drawerClose();
|
||||||
|
|
||||||
|
|
||||||
|
bool isTriggeredByConnectButton();
|
||||||
|
void setTriggeredBtConnectButton(bool trigger);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void goToPage(PageLoader::PageEnum page, bool slide = true);
|
void goToPage(PageLoader::PageEnum page, bool slide = true);
|
||||||
void goToStartPage();
|
void goToStartPage();
|
||||||
|
@ -121,6 +125,8 @@ private:
|
||||||
|
|
||||||
PageLoader::PageEnum m_currentRootPage;
|
PageLoader::PageEnum m_currentRootPage;
|
||||||
int m_drawerLayer;
|
int m_drawerLayer;
|
||||||
|
|
||||||
|
bool m_isTriggeredByConnectButton;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PAGECONTROLLER_H
|
#endif // PAGECONTROLLER_H
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
#include "systemController.h"
|
#include "systemController.h"
|
||||||
#include "ui/qautostart.h"
|
#include "ui/qautostart.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
#ifdef Q_OS_ANDROID
|
||||||
|
#include "../../platforms/android/android_controller.h"
|
||||||
|
#include "../../platforms/android/androidutils.h"
|
||||||
|
#include <QJniObject>
|
||||||
|
#endif
|
||||||
|
|
||||||
SettingsController::SettingsController(const QSharedPointer<ServersModel> &serversModel,
|
SettingsController::SettingsController(const QSharedPointer<ServersModel> &serversModel,
|
||||||
const QSharedPointer<ContainersModel> &containersModel,
|
const QSharedPointer<ContainersModel> &containersModel,
|
||||||
|
@ -18,6 +23,20 @@ SettingsController::SettingsController(const QSharedPointer<ServersModel> &serve
|
||||||
m_settings(settings)
|
m_settings(settings)
|
||||||
{
|
{
|
||||||
m_appVersion = QString("%1: %2 (%3)").arg(tr("Software version"), QString(APP_MAJOR_VERSION), __DATE__);
|
m_appVersion = QString("%1: %2 (%3)").arg(tr("Software version"), QString(APP_MAJOR_VERSION), __DATE__);
|
||||||
|
|
||||||
|
#ifdef Q_OS_ANDROID
|
||||||
|
if (!m_settings->isScreenshotsEnabled()) {
|
||||||
|
// Set security screen for Android app
|
||||||
|
AndroidUtils::runOnAndroidThreadSync([]() {
|
||||||
|
QJniObject activity = AndroidUtils::getActivity();
|
||||||
|
QJniObject window = activity.callObjectMethod("getWindow", "()Landroid/view/Window;");
|
||||||
|
if (window.isValid()) {
|
||||||
|
const int FLAG_SECURE = 8192;
|
||||||
|
window.callMethod<void>("addFlags", "(I)V", FLAG_SECURE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void SettingsController::toggleAmneziaDns(bool enable)
|
void SettingsController::toggleAmneziaDns(bool enable)
|
||||||
|
@ -152,3 +171,26 @@ void SettingsController::toggleStartMinimized(bool enable)
|
||||||
{
|
{
|
||||||
m_settings->setStartMinimized(enable);
|
m_settings->setStartMinimized(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SettingsController::isScreenshotsEnabled()
|
||||||
|
{
|
||||||
|
return m_settings->isScreenshotsEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SettingsController::toggleScreenshotsEnabled(bool enable)
|
||||||
|
{
|
||||||
|
m_settings->setScreenshotsEnabled(enable);
|
||||||
|
#ifdef Q_OS_ANDROID
|
||||||
|
std::string command = enable ? "clearFlags" : "addFlags";
|
||||||
|
|
||||||
|
// Set security screen for Android app
|
||||||
|
AndroidUtils::runOnAndroidThreadSync([&command]() {
|
||||||
|
QJniObject activity = AndroidUtils::getActivity();
|
||||||
|
QJniObject window = activity.callObjectMethod("getWindow", "()Landroid/view/Window;");
|
||||||
|
if (window.isValid()) {
|
||||||
|
const int FLAG_SECURE = 8192;
|
||||||
|
window.callMethod<void>(command.c_str(), "(I)V", FLAG_SECURE);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
}
|
|
@ -54,6 +54,9 @@ public slots:
|
||||||
bool isStartMinimizedEnabled();
|
bool isStartMinimizedEnabled();
|
||||||
void toggleStartMinimized(bool enable);
|
void toggleStartMinimized(bool enable);
|
||||||
|
|
||||||
|
bool isScreenshotsEnabled();
|
||||||
|
void toggleScreenshotsEnabled(bool enable);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void primaryDnsChanged();
|
void primaryDnsChanged();
|
||||||
void secondaryDnsChanged();
|
void secondaryDnsChanged();
|
||||||
|
|
|
@ -64,7 +64,7 @@ void SitesController::addSite(QString hostname)
|
||||||
QHostInfo::lookupHost(hostname, this, resolveCallback);
|
QHostInfo::lookupHost(hostname, this, resolveCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit finished(tr("New site added: ") + hostname);
|
emit finished(tr("New site added: %1").arg(hostname));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SitesController::removeSite(int index)
|
void SitesController::removeSite(int index)
|
||||||
|
@ -77,7 +77,7 @@ void SitesController::removeSite(int index)
|
||||||
Q_ARG(QStringList, QStringList() << hostname));
|
Q_ARG(QStringList, QStringList() << hostname));
|
||||||
QMetaObject::invokeMethod(m_vpnConnection.get(), "flushDns", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(m_vpnConnection.get(), "flushDns", Qt::QueuedConnection);
|
||||||
|
|
||||||
emit finished(tr("Site removed: ") + hostname);
|
emit finished(tr("Site removed: %1").arg(hostname));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SitesController::importSites(const QString &fileName, bool replaceExisting)
|
void SitesController::importSites(const QString &fileName, bool replaceExisting)
|
||||||
|
@ -85,19 +85,19 @@ void SitesController::importSites(const QString &fileName, bool replaceExisting)
|
||||||
QFile file(fileName);
|
QFile file(fileName);
|
||||||
|
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
if (!file.open(QIODevice::ReadOnly)) {
|
||||||
emit errorOccurred(tr("Can't open file: ") + fileName);
|
emit errorOccurred(tr("Can't open file: %1").arg(fileName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray jsonData = file.readAll();
|
QByteArray jsonData = file.readAll();
|
||||||
QJsonDocument jsonDocument = QJsonDocument::fromJson(jsonData);
|
QJsonDocument jsonDocument = QJsonDocument::fromJson(jsonData);
|
||||||
if (jsonDocument.isNull()) {
|
if (jsonDocument.isNull()) {
|
||||||
emit errorOccurred(tr("Failed to parse JSON data from file: ") + fileName);
|
emit errorOccurred(tr("Failed to parse JSON data from file: %1").arg(fileName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!jsonDocument.isArray()) {
|
if (!jsonDocument.isArray()) {
|
||||||
emit errorOccurred(tr("The JSON data is not an array in file: ") + fileName);
|
emit errorOccurred(tr("The JSON data is not an array in file: ").arg(fileName));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -214,6 +214,20 @@ bool ContainersModel::isAmneziaDnsContainerInstalled(const int serverIndex)
|
||||||
return containers.contains(DockerContainer::Dns);
|
return containers.contains(DockerContainer::Dns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ContainersModel::isAnyContainerInstalled()
|
||||||
|
{
|
||||||
|
for (int row=0; row < rowCount(); row++) {
|
||||||
|
QModelIndex idx = this->index(row, 0);
|
||||||
|
|
||||||
|
if (this->data(idx, IsInstalledRole).toBool() &&
|
||||||
|
this->data(idx, ServiceTypeRole).toInt() == ServiceType::Vpn) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QHash<int, QByteArray> ContainersModel::roleNames() const
|
QHash<int, QByteArray> ContainersModel::roleNames() const
|
||||||
{
|
{
|
||||||
QHash<int, QByteArray> roles;
|
QHash<int, QByteArray> roles;
|
||||||
|
|
|
@ -63,7 +63,7 @@ public slots:
|
||||||
bool isAmneziaDnsContainerInstalled();
|
bool isAmneziaDnsContainerInstalled();
|
||||||
bool isAmneziaDnsContainerInstalled(const int serverIndex);
|
bool isAmneziaDnsContainerInstalled(const int serverIndex);
|
||||||
|
|
||||||
// bool isOnlyServicesInstalled(const int serverIndex);
|
bool isAnyContainerInstalled();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QHash<int, QByteArray> roleNames() const override;
|
QHash<int, QByteArray> roleNames() const override;
|
||||||
|
|
|
@ -6,7 +6,8 @@ LanguageModel::LanguageModel(std::shared_ptr<Settings> settings, QObject *parent
|
||||||
QMetaEnum metaEnum = QMetaEnum::fromType<LanguageSettings::AvailableLanguageEnum>();
|
QMetaEnum metaEnum = QMetaEnum::fromType<LanguageSettings::AvailableLanguageEnum>();
|
||||||
for (int i = 0; i < metaEnum.keyCount(); i++) {
|
for (int i = 0; i < metaEnum.keyCount(); i++) {
|
||||||
m_availableLanguages.push_back(
|
m_availableLanguages.push_back(
|
||||||
LanguageModelData { metaEnum.valueToKey(i), static_cast<LanguageSettings::AvailableLanguageEnum>(i) });
|
LanguageModelData {getLocalLanguageName(static_cast<LanguageSettings::AvailableLanguageEnum>(i)),
|
||||||
|
static_cast<LanguageSettings::AvailableLanguageEnum>(i) });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,11 +37,26 @@ QHash<int, QByteArray> LanguageModel::roleNames() const
|
||||||
return roles;
|
return roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString LanguageModel::getLocalLanguageName(const LanguageSettings::AvailableLanguageEnum language)
|
||||||
|
{
|
||||||
|
QString strLanguage("");
|
||||||
|
switch (language) {
|
||||||
|
case LanguageSettings::AvailableLanguageEnum::English: strLanguage = "English"; break;
|
||||||
|
case LanguageSettings::AvailableLanguageEnum::Russian: strLanguage = "Русский"; break;
|
||||||
|
case LanguageSettings::AvailableLanguageEnum::China_cn: strLanguage = "\347\256\200\344\275\223\344\270\255\346\226\207"; break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return strLanguage;
|
||||||
|
}
|
||||||
|
|
||||||
void LanguageModel::changeLanguage(const LanguageSettings::AvailableLanguageEnum language)
|
void LanguageModel::changeLanguage(const LanguageSettings::AvailableLanguageEnum language)
|
||||||
{
|
{
|
||||||
switch (language) {
|
switch (language) {
|
||||||
case LanguageSettings::AvailableLanguageEnum::English: emit updateTranslations(QLocale::English); break;
|
case LanguageSettings::AvailableLanguageEnum::English: emit updateTranslations(QLocale::English); break;
|
||||||
case LanguageSettings::AvailableLanguageEnum::Russian: emit updateTranslations(QLocale::Russian); break;
|
case LanguageSettings::AvailableLanguageEnum::Russian: emit updateTranslations(QLocale::Russian); break;
|
||||||
|
case LanguageSettings::AvailableLanguageEnum::China_cn: emit updateTranslations(QLocale::Chinese); break;
|
||||||
default: emit updateTranslations(QLocale::English); break;
|
default: emit updateTranslations(QLocale::English); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,6 +67,7 @@ int LanguageModel::getCurrentLanguageIndex()
|
||||||
switch (locale.language()) {
|
switch (locale.language()) {
|
||||||
case QLocale::English: return static_cast<int>(LanguageSettings::AvailableLanguageEnum::English); break;
|
case QLocale::English: return static_cast<int>(LanguageSettings::AvailableLanguageEnum::English); break;
|
||||||
case QLocale::Russian: return static_cast<int>(LanguageSettings::AvailableLanguageEnum::Russian); break;
|
case QLocale::Russian: return static_cast<int>(LanguageSettings::AvailableLanguageEnum::Russian); break;
|
||||||
|
case QLocale::Chinese: return static_cast<int>(LanguageSettings::AvailableLanguageEnum::China_cn); break;
|
||||||
default: return static_cast<int>(LanguageSettings::AvailableLanguageEnum::English); break;
|
default: return static_cast<int>(LanguageSettings::AvailableLanguageEnum::English); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@ namespace LanguageSettings
|
||||||
Q_NAMESPACE
|
Q_NAMESPACE
|
||||||
enum class AvailableLanguageEnum {
|
enum class AvailableLanguageEnum {
|
||||||
English,
|
English,
|
||||||
Russian
|
Russian,
|
||||||
|
China_cn
|
||||||
};
|
};
|
||||||
Q_ENUM_NS(AvailableLanguageEnum)
|
Q_ENUM_NS(AvailableLanguageEnum)
|
||||||
|
|
||||||
|
@ -59,6 +60,8 @@ protected:
|
||||||
QHash<int, QByteArray> roleNames() const override;
|
QHash<int, QByteArray> roleNames() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QString getLocalLanguageName(const LanguageSettings::AvailableLanguageEnum language);
|
||||||
|
|
||||||
QVector<LanguageModelData> m_availableLanguages;
|
QVector<LanguageModelData> m_availableLanguages;
|
||||||
|
|
||||||
std::shared_ptr<Settings> m_settings;
|
std::shared_ptr<Settings> m_settings;
|
||||||
|
|
|
@ -88,6 +88,10 @@ void NotificationHandler::setConnectionState(Vpn::ConnectionState state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NotificationHandler::onTranslationsUpdated()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void NotificationHandler::unsecuredNetworkNotification(const QString& networkName) {
|
void NotificationHandler::unsecuredNetworkNotification(const QString& networkName) {
|
||||||
qDebug() << "Unsecured network notification shown";
|
qDebug() << "Unsecured network notification shown";
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ public:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void setConnectionState(Vpn::ConnectionState state);
|
virtual void setConnectionState(Vpn::ConnectionState state);
|
||||||
|
virtual void onTranslationsUpdated();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void notificationShown(const QString& title, const QString& message);
|
void notificationShown(const QString& title, const QString& message);
|
||||||
|
|
|
@ -5,6 +5,7 @@ import QtQuick.Shapes
|
||||||
import Qt5Compat.GraphicalEffects
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
import ConnectionState 1.0
|
import ConnectionState 1.0
|
||||||
|
import PageEnum 1.0
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: root
|
id: root
|
||||||
|
@ -137,6 +138,15 @@ Button {
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
if (!ContainersModel.isAnyContainerInstalled()) {
|
||||||
|
PageController.setTriggeredBtConnectButton(true)
|
||||||
|
|
||||||
|
ServersModel.currentlyProcessedIndex = ServersModel.getDefaultServerIndex()
|
||||||
|
PageController.goToPage(PageEnum.PageSetupWizardEasy)
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (ConnectionController.isConnectionInProgress) {
|
if (ConnectionController.isConnectionInProgress) {
|
||||||
ConnectionController.closeConnection()
|
ConnectionController.closeConnection()
|
||||||
} else if (ConnectionController.isConnected) {
|
} else if (ConnectionController.isConnected) {
|
||||||
|
|
|
@ -114,7 +114,7 @@ DrawerType {
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 8
|
Layout.topMargin: 24
|
||||||
|
|
||||||
defaultColor: "transparent"
|
defaultColor: "transparent"
|
||||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||||
|
@ -123,7 +123,7 @@ DrawerType {
|
||||||
textColor: "#D7D8DB"
|
textColor: "#D7D8DB"
|
||||||
borderWidth: 1
|
borderWidth: 1
|
||||||
|
|
||||||
text: qsTr("Show content")
|
text: qsTr("Show connection settings")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
configContentDrawer.visible = true
|
configContentDrawer.visible = true
|
||||||
|
|
|
@ -23,6 +23,9 @@ Item {
|
||||||
image: backButtonImage
|
image: backButtonImage
|
||||||
imageColor: "#D7D8DB"
|
imageColor: "#D7D8DB"
|
||||||
|
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (backButtonFunction && typeof backButtonFunction === "function") {
|
if (backButtonFunction && typeof backButtonFunction === "function") {
|
||||||
backButtonFunction()
|
backButtonFunction()
|
||||||
|
|
|
@ -90,6 +90,9 @@ Button {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
Layout.preferredHeight: 20
|
||||||
|
Layout.preferredWidth: 20
|
||||||
|
|
||||||
source: root.imageSource
|
source: root.imageSource
|
||||||
visible: root.imageSource === "" ? false : true
|
visible: root.imageSource === "" ? false : true
|
||||||
|
|
||||||
|
|
|
@ -123,4 +123,11 @@ RadioButton {
|
||||||
Layout.bottomMargin: 16
|
Layout.bottomMargin: 16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import QtQuick.Controls
|
||||||
Drawer {
|
Drawer {
|
||||||
id: drawer
|
id: drawer
|
||||||
property bool needCloseButton: true
|
property bool needCloseButton: true
|
||||||
property bool isOpened: false
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: PageController
|
target: PageController
|
||||||
|
@ -50,51 +49,22 @@ Drawer {
|
||||||
if (PageController.getInitialPageNavigationBarColor() !== 0xFF1C1D21) {
|
if (PageController.getInitialPageNavigationBarColor() !== 0xFF1C1D21) {
|
||||||
PageController.updateNavigationBarColor(0xFF1C1D21)
|
PageController.updateNavigationBarColor(0xFF1C1D21)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onOpened: {
|
||||||
if (needCloseButton) {
|
if (needCloseButton) {
|
||||||
PageController.drawerOpen()
|
PageController.drawerOpen()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onAboutToHide: {
|
onClosed: {
|
||||||
if (needCloseButton) {
|
if (needCloseButton) {
|
||||||
PageController.drawerClose()
|
PageController.drawerClose()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
onOpened: {
|
|
||||||
isOpened = true
|
|
||||||
}
|
|
||||||
|
|
||||||
onClosed: {
|
|
||||||
isOpened = false
|
|
||||||
|
|
||||||
var initialPageNavigationBarColor = PageController.getInitialPageNavigationBarColor()
|
var initialPageNavigationBarColor = PageController.getInitialPageNavigationBarColor()
|
||||||
if (initialPageNavigationBarColor !== 0xFF1C1D21) {
|
if (initialPageNavigationBarColor !== 0xFF1C1D21) {
|
||||||
PageController.updateNavigationBarColor(initialPageNavigationBarColor)
|
PageController.updateNavigationBarColor(initialPageNavigationBarColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onPositionChanged: {
|
|
||||||
if (isOpened && (position <= 0.99 && position >= 0.95)) {
|
|
||||||
mouseArea.canceled()
|
|
||||||
drawer.close()
|
|
||||||
mouseArea.exited()
|
|
||||||
dropArea.exited()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DropArea {
|
|
||||||
id: dropArea
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: mouseArea
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
onPressed: {
|
|
||||||
isOpened = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,8 @@ Item {
|
||||||
property string rootButtonImage: "qrc:/images/controls/chevron-down.svg"
|
property string rootButtonImage: "qrc:/images/controls/chevron-down.svg"
|
||||||
property string rootButtonImageColor: "#D7D8DB"
|
property string rootButtonImageColor: "#D7D8DB"
|
||||||
property string rootButtonBackgroundColor: "#1C1D21"
|
property string rootButtonBackgroundColor: "#1C1D21"
|
||||||
|
property string rootButtonBackgroundHoveredColor: "#1C1D21"
|
||||||
|
property string rootButtonBackgroundPressedColor: "#1C1D21"
|
||||||
|
|
||||||
property string rootButtonHoveredBorderColor: "#494B50"
|
property string rootButtonHoveredBorderColor: "#494B50"
|
||||||
property string rootButtonDefaultBorderColor: "#2C2D30"
|
property string rootButtonDefaultBorderColor: "#2C2D30"
|
||||||
|
@ -71,6 +73,10 @@ Item {
|
||||||
Behavior on border.color {
|
Behavior on border.color {
|
||||||
PropertyAnimation { duration: 200 }
|
PropertyAnimation { duration: 200 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Behavior on color {
|
||||||
|
PropertyAnimation { duration: 200 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -112,6 +118,9 @@ Item {
|
||||||
ImageButtonType {
|
ImageButtonType {
|
||||||
Layout.rightMargin: 16
|
Layout.rightMargin: 16
|
||||||
|
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
hoverEnabled: false
|
hoverEnabled: false
|
||||||
image: rootButtonImage
|
image: rootButtonImage
|
||||||
imageColor: rootButtonImageColor
|
imageColor: rootButtonImageColor
|
||||||
|
@ -126,12 +135,20 @@ Item {
|
||||||
onEntered: {
|
onEntered: {
|
||||||
if (menu.visible === false) {
|
if (menu.visible === false) {
|
||||||
rootButtonBackground.border.color = rootButtonHoveredBorderColor
|
rootButtonBackground.border.color = rootButtonHoveredBorderColor
|
||||||
|
rootButtonBackground.color = rootButtonBackgroundHoveredColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onExited: {
|
onExited: {
|
||||||
if (menu.visible === false) {
|
if (menu.visible === false) {
|
||||||
rootButtonBackground.border.color = rootButtonDefaultBorderColor
|
rootButtonBackground.border.color = rootButtonDefaultBorderColor
|
||||||
|
rootButtonBackground.color = rootButtonBackgroundColor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onPressed: {
|
||||||
|
if (menu.visible === false) {
|
||||||
|
rootButtonBackground.color = pressed ? rootButtonBackgroundPressedColor : entered ? rootButtonHoveredBorderColor : rootButtonDefaultBorderColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,9 @@ Item {
|
||||||
ImageButtonType {
|
ImageButtonType {
|
||||||
id: headerActionButton
|
id: headerActionButton
|
||||||
|
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
image: root.actionButtonImage
|
image: root.actionButtonImage
|
||||||
imageColor: "#D7D8DB"
|
imageColor: "#D7D8DB"
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,9 @@ Item {
|
||||||
ImageButtonType {
|
ImageButtonType {
|
||||||
id: headerActionButton
|
id: headerActionButton
|
||||||
|
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
image: root.actionButtonImage
|
image: root.actionButtonImage
|
||||||
|
|
|
@ -15,8 +15,8 @@ Button {
|
||||||
property string imageColor: "#878B91"
|
property string imageColor: "#878B91"
|
||||||
property string disableImageColor: "#2C2D30"
|
property string disableImageColor: "#2C2D30"
|
||||||
|
|
||||||
implicitWidth: 40
|
property alias backgroundColor: background.color
|
||||||
implicitHeight: 40
|
property alias backgroundRadius: background.radius
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
|
@ -31,16 +31,16 @@ Button {
|
||||||
id: background
|
id: background
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: 12
|
|
||||||
color: {
|
color: {
|
||||||
if (root.enabled) {
|
if (root.enabled) {
|
||||||
if(root.pressed) {
|
if (root.pressed) {
|
||||||
return pressedColor
|
return pressedColor
|
||||||
}
|
}
|
||||||
return hovered ? hoveredColor : defaultColor
|
return hovered ? hoveredColor : defaultColor
|
||||||
}
|
}
|
||||||
return defaultColor
|
return defaultColor
|
||||||
}
|
}
|
||||||
|
radius: 12
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
PropertyAnimation { duration: 200 }
|
PropertyAnimation { duration: 200 }
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,9 @@ Item {
|
||||||
ImageButtonType {
|
ImageButtonType {
|
||||||
id: rightImage
|
id: rightImage
|
||||||
|
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
hoverEnabled: false
|
hoverEnabled: false
|
||||||
image: rightImageSource
|
image: rightImageSource
|
||||||
imageColor: rightImageColor
|
imageColor: rightImageColor
|
||||||
|
|
|
@ -9,71 +9,99 @@ Rectangle {
|
||||||
property alias textArea: textArea
|
property alias textArea: textArea
|
||||||
property alias textAreaText: textArea.text
|
property alias textAreaText: textArea.text
|
||||||
|
|
||||||
|
property string borderHoveredColor: "#494B50"
|
||||||
|
property string borderNormalColor: "#2C2D30"
|
||||||
|
property string borderFocusedColor: "#d7d8db"
|
||||||
|
|
||||||
height: 148
|
height: 148
|
||||||
color: "#1C1D21"
|
color: "#1C1D21"
|
||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: "#2C2D30"
|
border.color: getBorderColor(borderNormalColor)
|
||||||
radius: 16
|
radius: 16
|
||||||
|
|
||||||
FlickableType {
|
MouseArea {
|
||||||
id: fl
|
id: parentMouse
|
||||||
interactive: false
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.IBeamCursor
|
||||||
|
onClicked: textArea.forceActiveFocus()
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
anchors.top: parent.top
|
FlickableType {
|
||||||
anchors.bottom: parent.bottom
|
id: fl
|
||||||
contentHeight: textArea.implicitHeight
|
interactive: false
|
||||||
TextArea {
|
|
||||||
id: textArea
|
|
||||||
|
|
||||||
width: parent.width
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
contentHeight: textArea.implicitHeight
|
||||||
|
TextArea {
|
||||||
|
id: textArea
|
||||||
|
|
||||||
topPadding: 16
|
width: parent.width
|
||||||
leftPadding: 16
|
|
||||||
anchors.topMargin: 16
|
|
||||||
anchors.bottomMargin: 16
|
|
||||||
|
|
||||||
color: "#D7D8DB"
|
topPadding: 16
|
||||||
selectionColor: "#633303"
|
leftPadding: 16
|
||||||
selectedTextColor: "#D7D8DB"
|
anchors.topMargin: 16
|
||||||
placeholderTextColor: "#878B91"
|
anchors.bottomMargin: 16
|
||||||
|
|
||||||
font.pixelSize: 16
|
color: "#D7D8DB"
|
||||||
font.weight: Font.Medium
|
selectionColor: "#633303"
|
||||||
font.family: "PT Root UI VF"
|
selectedTextColor: "#D7D8DB"
|
||||||
|
placeholderTextColor: "#878B91"
|
||||||
|
|
||||||
placeholderText: root.placeholderText
|
font.pixelSize: 16
|
||||||
text: root.text
|
font.weight: Font.Medium
|
||||||
|
font.family: "PT Root UI VF"
|
||||||
|
|
||||||
onCursorVisibleChanged: {
|
placeholderText: root.placeholderText
|
||||||
if (textArea.cursorVisible) {
|
text: root.text
|
||||||
fl.interactive = true
|
|
||||||
} else {
|
onCursorVisibleChanged: {
|
||||||
fl.interactive = false
|
if (textArea.cursorVisible) {
|
||||||
|
fl.interactive = true
|
||||||
|
} else {
|
||||||
|
fl.interactive = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: textAreaMouse
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.RightButton
|
||||||
|
hoverEnabled: true
|
||||||
|
onClicked: {
|
||||||
|
fl.interactive = true
|
||||||
|
contextMenu.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onFocusChanged: {
|
||||||
|
root.border.color = getBorderColor(borderNormalColor)
|
||||||
|
}
|
||||||
|
|
||||||
|
ContextMenuType {
|
||||||
|
id: contextMenu
|
||||||
|
textObj: textArea
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
wrapMode: Text.Wrap
|
onPressed: {
|
||||||
|
root.border.color = getBorderColor(borderFocusedColor)
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
onExited: {
|
||||||
anchors.fill: parent
|
root.border.color = getBorderColor(borderNormalColor)
|
||||||
acceptedButtons: Qt.RightButton
|
}
|
||||||
onClicked: {
|
|
||||||
fl.interactive = true
|
|
||||||
contextMenu.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ContextMenuType {
|
onEntered: {
|
||||||
id: contextMenu
|
root.border.color = getBorderColor(borderHoveredColor)
|
||||||
textObj: textArea
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo make whole background clickable, with code below we lose ability to select text by mouse
|
|
||||||
// MouseArea {
|
function getBorderColor(noneFocusedColor) {
|
||||||
// anchors.fill: parent
|
return textArea.focus ? root.borderFocusedColor : noneFocusedColor
|
||||||
// cursorShape: Qt.IBeamCursor
|
}
|
||||||
// onClicked: textArea.forceActiveFocus()
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ Item {
|
||||||
|
|
||||||
property string backgroundColor: "#1c1d21"
|
property string backgroundColor: "#1c1d21"
|
||||||
property string backgroundDisabledColor: "transparent"
|
property string backgroundDisabledColor: "transparent"
|
||||||
|
property string bgBorderHoveredColor: "#494B50"
|
||||||
|
|
||||||
implicitWidth: content.implicitWidth
|
implicitWidth: content.implicitWidth
|
||||||
implicitHeight: content.implicitHeight
|
implicitHeight: content.implicitHeight
|
||||||
|
@ -45,7 +46,7 @@ Item {
|
||||||
Layout.preferredHeight: input.implicitHeight
|
Layout.preferredHeight: input.implicitHeight
|
||||||
color: root.enabled ? root.backgroundColor : root.backgroundDisabledColor
|
color: root.enabled ? root.backgroundColor : root.backgroundDisabledColor
|
||||||
radius: 16
|
radius: 16
|
||||||
border.color: textField.focus ? root.borderFocusedColor : root.borderColor
|
border.color: getBackgroundBorderColor(root.borderColor)
|
||||||
border.width: 1
|
border.width: 1
|
||||||
|
|
||||||
Behavior on border.color {
|
Behavior on border.color {
|
||||||
|
@ -109,12 +110,17 @@ Item {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
onClicked: contextMenu.open()
|
onClicked: contextMenu.open()
|
||||||
|
enabled: true
|
||||||
}
|
}
|
||||||
|
|
||||||
ContextMenuType {
|
ContextMenuType {
|
||||||
id: contextMenu
|
id: contextMenu
|
||||||
textObj: textField
|
textObj: textField
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onFocusChanged: {
|
||||||
|
backgroud.border.color = getBackgroundBorderColor(root.borderColor)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,11 +162,28 @@ Item {
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: root
|
anchors.fill: root
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.IBeamCursor
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
onPressed: function(mouse) {
|
onPressed: function(mouse) {
|
||||||
textField.forceActiveFocus()
|
textField.forceActiveFocus()
|
||||||
mouse.accepted = false
|
mouse.accepted = false
|
||||||
|
|
||||||
|
backgroud.border.color = getBackgroundBorderColor(root.borderColor)
|
||||||
|
}
|
||||||
|
|
||||||
|
onEntered: {
|
||||||
|
backgroud.border.color = getBackgroundBorderColor(bgBorderHoveredColor)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onExited: {
|
||||||
|
backgroud.border.color = getBackgroundBorderColor(root.borderColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getBackgroundBorderColor(noneFocusedColor) {
|
||||||
|
return textField.focus ? root.borderFocusedColor : noneFocusedColor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ Text {
|
||||||
|
|
||||||
color: "#D7D8DB"
|
color: "#D7D8DB"
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
font.weight: 500
|
font.weight: 600
|
||||||
font.family: "PT Root UI VF"
|
font.family: "PT Root UI VF"
|
||||||
|
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
|
|
|
@ -23,6 +23,9 @@ Popup {
|
||||||
image: "qrc:/images/svg/close_black_24dp.svg"
|
image: "qrc:/images/svg/close_black_24dp.svg"
|
||||||
imageColor: "#D7D8DB"
|
imageColor: "#D7D8DB"
|
||||||
|
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
PageController.goToDrawerRootPage()
|
PageController.goToDrawerRootPage()
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ PageType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 20
|
Layout.topMargin: 20
|
||||||
|
|
||||||
headerText: qsTr("Removing services from ") + name
|
headerText: qsTr("Removing services from %1").arg(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
ProgressBarType {
|
ProgressBarType {
|
||||||
|
|
|
@ -26,11 +26,17 @@ PageType {
|
||||||
property string defaultServerHostName: ServersModel.defaultServerHostName
|
property string defaultServerHostName: ServersModel.defaultServerHostName
|
||||||
property string defaultContainerName: ContainersModel.defaultContainerName
|
property string defaultContainerName: ContainersModel.defaultContainerName
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
enabled: buttonContent.state === "expanded"
|
||||||
|
onClicked: {
|
||||||
|
buttonContent.state = "collapsed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
anchors.top: parent.top
|
anchors.fill: parent
|
||||||
anchors.bottom: buttonBackground.top
|
anchors.bottomMargin: buttonContent.collapsedHeight
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
|
||||||
|
|
||||||
ConnectButton {
|
ConnectButton {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
@ -41,17 +47,66 @@ PageType {
|
||||||
target: PageController
|
target: PageController
|
||||||
|
|
||||||
function onRestorePageHomeState(isContainerInstalled) {
|
function onRestorePageHomeState(isContainerInstalled) {
|
||||||
menu.visible = true
|
buttonContent.state = "expanded"
|
||||||
if (isContainerInstalled) {
|
if (isContainerInstalled) {
|
||||||
containersDropDown.menuVisible = true
|
containersDropDown.menuVisible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function onForceCloseDrawer() {
|
||||||
|
buttonContent.state = "collapsed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: dragArea
|
||||||
|
|
||||||
|
anchors.fill: buttonBackground
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
drag.target: buttonContent
|
||||||
|
drag.axis: Drag.YAxis
|
||||||
|
drag.maximumY: root.height - buttonContent.collapsedHeight
|
||||||
|
drag.minimumY: root.height - root.height * 0.9
|
||||||
|
|
||||||
|
/** If drag area is released at any point other than min or max y, transition to the other state */
|
||||||
|
onReleased: {
|
||||||
|
if (buttonContent.state === "collapsed" && buttonContent.y < dragArea.drag.maximumY) {
|
||||||
|
buttonContent.state = "expanded"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (buttonContent.state === "expanded" && buttonContent.y > dragArea.drag.minimumY) {
|
||||||
|
buttonContent.state = "collapsed"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onEntered: {
|
||||||
|
collapsedButtonChevron.backgroundColor = collapsedButtonChevron.hoveredColor
|
||||||
|
collapsedButtonHeader.opacity = 0.8
|
||||||
|
}
|
||||||
|
onExited: {
|
||||||
|
collapsedButtonChevron.backgroundColor = collapsedButtonChevron.defaultColor
|
||||||
|
collapsedButtonHeader.opacity = 1
|
||||||
|
}
|
||||||
|
onPressedChanged: {
|
||||||
|
collapsedButtonChevron.backgroundColor = pressed ? collapsedButtonChevron.pressedColor : entered ? collapsedButtonChevron.hoveredColor : collapsedButtonChevron.defaultColor
|
||||||
|
collapsedButtonHeader.opacity = 0.7
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
if (buttonContent.state === "collapsed") {
|
||||||
|
buttonContent.state = "expanded"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: buttonBackground
|
id: buttonBackground
|
||||||
anchors.fill: buttonContent
|
|
||||||
|
|
||||||
|
anchors { left: buttonContent.left; right: buttonContent.right; top: buttonContent.top }
|
||||||
|
height: root.height
|
||||||
radius: 16
|
radius: 16
|
||||||
color: root.defaultColor
|
color: root.defaultColor
|
||||||
border.color: root.borderColor
|
border.color: root.borderColor
|
||||||
|
@ -69,19 +124,99 @@ PageType {
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: buttonContent
|
id: buttonContent
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.left: parent.left
|
/** Initial height of button content */
|
||||||
anchors.bottom: parent.bottom
|
property int collapsedHeight: 0
|
||||||
|
/** True when expanded objects should be visible */
|
||||||
|
property bool expandedVisibility: buttonContent.state === "expanded" || (buttonContent.state === "collapsed" && dragArea.drag.active === true)
|
||||||
|
/** True when collapsed objects should be visible */
|
||||||
|
property bool collapsedVisibility: buttonContent.state === "collapsed" && dragArea.drag.active === false
|
||||||
|
|
||||||
|
Drag.active: dragArea.drag.active
|
||||||
|
anchors.right: root.right
|
||||||
|
anchors.left: root.left
|
||||||
|
y: root.height - buttonContent.height
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
buttonContent.state = "collapsed"
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set once based on first implicit height change once all children are layed out */
|
||||||
|
onImplicitHeightChanged: {
|
||||||
|
if (buttonContent.state === "collapsed" && collapsedHeight == 0) {
|
||||||
|
collapsedHeight = implicitHeight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onStateChanged: {
|
||||||
|
if (buttonContent.state === "collapsed") {
|
||||||
|
var initialPageNavigationBarColor = PageController.getInitialPageNavigationBarColor()
|
||||||
|
if (initialPageNavigationBarColor !== 0xFF1C1D21) {
|
||||||
|
PageController.updateNavigationBarColor(initialPageNavigationBarColor)
|
||||||
|
}
|
||||||
|
PageController.drawerClose()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (buttonContent.state === "expanded") {
|
||||||
|
if (PageController.getInitialPageNavigationBarColor() !== 0xFF1C1D21) {
|
||||||
|
PageController.updateNavigationBarColor(0xFF1C1D21)
|
||||||
|
}
|
||||||
|
PageController.drawerOpen()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Two states of buttonContent, great place to add any future animations for the drawer */
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "collapsed"
|
||||||
|
PropertyChanges {
|
||||||
|
target: buttonContent
|
||||||
|
y: root.height - collapsedHeight
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "expanded"
|
||||||
|
PropertyChanges {
|
||||||
|
target: buttonContent
|
||||||
|
y: dragArea.drag.minimumY
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
transitions: [
|
||||||
|
Transition {
|
||||||
|
from: "collapsed"
|
||||||
|
to: "expanded"
|
||||||
|
PropertyAnimation {
|
||||||
|
target: buttonContent
|
||||||
|
properties: "y"
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Transition {
|
||||||
|
from: "expanded"
|
||||||
|
to: "collapsed"
|
||||||
|
PropertyAnimation {
|
||||||
|
target: buttonContent
|
||||||
|
properties: "y"
|
||||||
|
duration: 200
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.topMargin: 24
|
Layout.topMargin: 24
|
||||||
Layout.leftMargin: 24
|
Layout.leftMargin: 24
|
||||||
Layout.rightMargin: 24
|
Layout.rightMargin: 24
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
|
visible: buttonContent.collapsedVisibility
|
||||||
|
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Header1TextType {
|
Header1TextType {
|
||||||
|
id: collapsedButtonHeader
|
||||||
Layout.maximumWidth: buttonContent.width - 48 - 18 - 12 // todo
|
Layout.maximumWidth: buttonContent.width - 48 - 18 - 12 // todo
|
||||||
|
|
||||||
maximumLineCount: 2
|
maximumLineCount: 2
|
||||||
|
@ -89,21 +224,40 @@ PageType {
|
||||||
|
|
||||||
text: root.defaultServerName
|
text: root.defaultServerName
|
||||||
horizontalAlignment: Qt.AlignHCenter
|
horizontalAlignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
PropertyAnimation { duration: 200 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
ImageButtonType {
|
||||||
Layout.preferredWidth: 18
|
id: collapsedButtonChevron
|
||||||
Layout.preferredHeight: 18
|
|
||||||
|
|
||||||
Layout.leftMargin: 12
|
Layout.leftMargin: 8
|
||||||
|
|
||||||
source: "qrc:/images/controls/chevron-down.svg"
|
hoverEnabled: false
|
||||||
|
image: "qrc:/images/controls/chevron-down.svg"
|
||||||
|
imageColor: "#d7d8db"
|
||||||
|
|
||||||
|
icon.width: 18
|
||||||
|
icon.height: 18
|
||||||
|
backgroundRadius: 16
|
||||||
|
horizontalPadding: 4
|
||||||
|
topPadding: 4
|
||||||
|
bottomPadding: 3
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
if (buttonContent.state === "collapsed") {
|
||||||
|
buttonContent.state = "expanded"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LabelTextType {
|
LabelTextType {
|
||||||
Layout.bottomMargin: 44
|
Layout.bottomMargin: 44
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
|
visible: buttonContent.collapsedVisibility
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
var description = ""
|
var description = ""
|
||||||
|
@ -122,38 +276,13 @@ PageType {
|
||||||
return description
|
return description
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: buttonBackground
|
|
||||||
cursorShape: Qt.PointingHandCursor
|
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
menu.visible = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawerType {
|
|
||||||
id: menu
|
|
||||||
|
|
||||||
interactive: {
|
|
||||||
if (stackView && stackView.currentItem) {
|
|
||||||
return (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) ? true : false
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dragMargin: buttonBackground.height + 56 // page start tabBar height
|
|
||||||
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height * 0.9
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: serversMenuHeader
|
id: serversMenuHeader
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.right: parent.right
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||||
anchors.left: parent.left
|
Layout.fillWidth: true
|
||||||
|
visible: buttonContent.expandedVisibility
|
||||||
|
|
||||||
Header1TextType {
|
Header1TextType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -183,8 +312,10 @@ PageType {
|
||||||
|
|
||||||
rootButtonImageColor: "#0E0E11"
|
rootButtonImageColor: "#0E0E11"
|
||||||
rootButtonBackgroundColor: "#D7D8DB"
|
rootButtonBackgroundColor: "#D7D8DB"
|
||||||
|
rootButtonBackgroundHoveredColor: Qt.rgba(215, 216, 219, 0.8)
|
||||||
|
rootButtonBackgroundPressedColor: Qt.rgba(215, 216, 219, 0.65)
|
||||||
rootButtonHoveredBorderColor: "transparent"
|
rootButtonHoveredBorderColor: "transparent"
|
||||||
rootButtonPressedBorderColor: "transparent"
|
rootButtonDefaultBorderColor: "transparent"
|
||||||
rootButtonTextTopMargin: 8
|
rootButtonTextTopMargin: 8
|
||||||
rootButtonTextBottomMargin: 8
|
rootButtonTextBottomMargin: 8
|
||||||
|
|
||||||
|
@ -232,13 +363,14 @@ PageType {
|
||||||
Layout.topMargin: 48
|
Layout.topMargin: 48
|
||||||
Layout.leftMargin: 16
|
Layout.leftMargin: 16
|
||||||
Layout.rightMargin: 16
|
Layout.rightMargin: 16
|
||||||
|
visible: buttonContent.expandedVisibility
|
||||||
|
|
||||||
actionButtonImage: "qrc:/images/controls/plus.svg"
|
actionButtonImage: "qrc:/images/controls/plus.svg"
|
||||||
|
|
||||||
headerText: qsTr("Servers")
|
headerText: qsTr("Servers")
|
||||||
|
|
||||||
actionButtonFunction: function() {
|
actionButtonFunction: function() {
|
||||||
menu.visible = false
|
buttonContent.state = "collapsed"
|
||||||
connectionTypeSelection.visible = true
|
connectionTypeSelection.visible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -248,10 +380,23 @@ PageType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FlickableType {
|
Flickable {
|
||||||
anchors.top: serversMenuHeader.bottom
|
id: serversContainer
|
||||||
anchors.topMargin: 16
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.topMargin: 16
|
||||||
contentHeight: col.implicitHeight
|
contentHeight: col.implicitHeight
|
||||||
|
implicitHeight: root.height - (root.height * 0.1) - serversMenuHeader.implicitHeight - 52 //todo 52 is tabbar height
|
||||||
|
visible: buttonContent.expandedVisibility
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
ScrollBar.vertical: ScrollBar {
|
||||||
|
id: scrollBar
|
||||||
|
policy: serversContainer.height >= serversContainer.contentHeight ? ScrollBar.AlwaysOff : ScrollBar.AlwaysOn
|
||||||
|
}
|
||||||
|
|
||||||
|
Keys.onUpPressed: scrollBar.decrease()
|
||||||
|
Keys.onDownPressed: scrollBar.increase()
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: col
|
id: col
|
||||||
|
@ -346,13 +491,15 @@ PageType {
|
||||||
onClicked: function() {
|
onClicked: function() {
|
||||||
ServersModel.currentlyProcessedIndex = index
|
ServersModel.currentlyProcessedIndex = index
|
||||||
PageController.goToPage(PageEnum.PageSettingsServerInfo)
|
PageController.goToPage(PageEnum.PageSettingsServerInfo)
|
||||||
menu.visible = false
|
buttonContent.state = "collapsed"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DividerType {
|
DividerType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: 0
|
||||||
|
Layout.rightMargin: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,7 @@ PageType {
|
||||||
textColor: "#EB5757"
|
textColor: "#EB5757"
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
questionDrawer.headerText = qsTr("Remove ") + ContainersModel.getCurrentlyProcessedContainerName() + qsTr(" from server?")
|
questionDrawer.headerText = qsTr("Remove %1 from server?").arg(ContainersModel.getCurrentlyProcessedContainerName())
|
||||||
questionDrawer.descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it")
|
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")
|
||||||
|
|
|
@ -63,7 +63,7 @@ PageType {
|
||||||
textColor: "#EB5757"
|
textColor: "#EB5757"
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
questionDrawer.headerText = qsTr("Remove ") + ContainersModel.getCurrentlyProcessedContainerName() + qsTr(" from server?")
|
questionDrawer.headerText = qsTr("Remove %1 from server?").arg(ContainersModel.getCurrentlyProcessedContainerName())
|
||||||
questionDrawer.yesButtonText = qsTr("Continue")
|
questionDrawer.yesButtonText = qsTr("Continue")
|
||||||
questionDrawer.noButtonText = qsTr("Cancel")
|
questionDrawer.noButtonText = qsTr("Cancel")
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,26 @@ PageType {
|
||||||
headerText: qsTr("Application")
|
headerText: qsTr("Application")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SwitcherType {
|
||||||
|
visible: GC.isMobile()
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: 16
|
||||||
|
|
||||||
|
text: qsTr("Allow application screenshots")
|
||||||
|
|
||||||
|
checked: SettingsController.isScreenshotsEnabled()
|
||||||
|
onCheckedChanged: {
|
||||||
|
if (checked !== SettingsController.isScreenshotsEnabled()) {
|
||||||
|
SettingsController.toggleScreenshotsEnabled(checked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DividerType {
|
||||||
|
visible: GC.isMobile()
|
||||||
|
}
|
||||||
|
|
||||||
SwitcherType {
|
SwitcherType {
|
||||||
visible: !GC.isMobile()
|
visible: !GC.isMobile()
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,8 @@ PageType {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: 16
|
Layout.margins: 16
|
||||||
|
|
||||||
text: qsTr("Use AmneziaDNS if installed on the server")
|
text: qsTr("Use AmneziaDNS")
|
||||||
|
descriptionText: qsTr("If AmneziaDNS is installed on the server")
|
||||||
|
|
||||||
checked: SettingsController.isAmneziaDnsEnabled()
|
checked: SettingsController.isAmneziaDnsEnabled()
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
|
|
|
@ -53,7 +53,7 @@ PageType {
|
||||||
id: primaryDns
|
id: primaryDns
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
headerText: "Primary DNS"
|
headerText: qsTr("Primary DNS")
|
||||||
|
|
||||||
textFieldText: SettingsController.primaryDns
|
textFieldText: SettingsController.primaryDns
|
||||||
textField.validator: RegularExpressionValidator {
|
textField.validator: RegularExpressionValidator {
|
||||||
|
@ -65,7 +65,7 @@ PageType {
|
||||||
id: secondaryDns
|
id: secondaryDns
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
headerText: "Secondary DNS"
|
headerText: qsTr("Secondary DNS")
|
||||||
|
|
||||||
textFieldText: SettingsController.secondaryDns
|
textFieldText: SettingsController.secondaryDns
|
||||||
textField.validator: RegularExpressionValidator {
|
textField.validator: RegularExpressionValidator {
|
||||||
|
|
|
@ -105,7 +105,7 @@ PageType {
|
||||||
if (GC.isMobile()) {
|
if (GC.isMobile()) {
|
||||||
fileName = "AmneziaVPN.log"
|
fileName = "AmneziaVPN.log"
|
||||||
} else {
|
} else {
|
||||||
fileName = SystemController.getFileName(qsTr("Save logs"),
|
fileName = SystemController.getFileName(qsTr("Save"),
|
||||||
qsTr("Logs files (*.log)"),
|
qsTr("Logs files (*.log)"),
|
||||||
StandardPaths.standardLocations(StandardPaths.DocumentsLocation) + "/AmneziaVPN",
|
StandardPaths.standardLocations(StandardPaths.DocumentsLocation) + "/AmneziaVPN",
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -113,7 +113,7 @@ PageType {
|
||||||
textColor: "#EB5757"
|
textColor: "#EB5757"
|
||||||
|
|
||||||
clickedFunction: function() {
|
clickedFunction: function() {
|
||||||
questionDrawer.headerText = qsTr("Remove ") + ContainersModel.getCurrentlyProcessedContainerName() + qsTr(" from server?")
|
questionDrawer.headerText = qsTr("Remove %1 from server?").arg(ContainersModel.getCurrentlyProcessedContainerName())
|
||||||
questionDrawer.descriptionText = qsTr("All users with whom you shared a connection will no longer be able to connect to it")
|
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")
|
||||||
|
|
|
@ -62,6 +62,7 @@ PageType {
|
||||||
id: header
|
id: header
|
||||||
|
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
|
headerTextMaximumLineCount: 10
|
||||||
|
|
||||||
headerText: qsTr("What is the level of internet control in your region?")
|
headerText: qsTr("What is the level of internet control in your region?")
|
||||||
}
|
}
|
||||||
|
@ -145,14 +146,13 @@ PageType {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
implicitWidth: 1
|
implicitWidth: 1
|
||||||
implicitHeight: 1
|
implicitHeight: 54
|
||||||
}
|
}
|
||||||
|
|
||||||
BasicButtonType {
|
BasicButtonType {
|
||||||
id: continueButton
|
id: continueButton
|
||||||
|
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
anchors.topMargin: 24
|
|
||||||
|
|
||||||
text: qsTr("Continue")
|
text: qsTr("Continue")
|
||||||
|
|
||||||
|
@ -183,6 +183,17 @@ PageType {
|
||||||
textColor: "#D7D8DB"
|
textColor: "#D7D8DB"
|
||||||
borderWidth: 1
|
borderWidth: 1
|
||||||
|
|
||||||
|
visible: {
|
||||||
|
if (PageController.isTriggeredByConnectButton()) {
|
||||||
|
PageController.setTriggeredBtConnectButton(false)
|
||||||
|
|
||||||
|
return ContainersModel.isAnyContainerInstalled()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
text: qsTr("Set up later")
|
text: qsTr("Set up later")
|
||||||
|
|
||||||
onClicked: function() {
|
onClicked: function() {
|
||||||
|
|
|
@ -72,7 +72,7 @@ PageType {
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
headerText: qsTr("Installing ") + name
|
headerText: qsTr("Installing %1").arg(name)
|
||||||
descriptionText: description
|
descriptionText: description
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,13 +219,14 @@ PageType {
|
||||||
|
|
||||||
if (accessTypeSelector.currentIndex !== 0) {
|
if (accessTypeSelector.currentIndex !== 0) {
|
||||||
shareConnectionDrawer.headerText = qsTr("Accessing ") + serverSelector.text
|
shareConnectionDrawer.headerText = qsTr("Accessing ") + serverSelector.text
|
||||||
shareConnectionDrawer.configContentHeaderText = qsTr("File with connection settings to ") + serverSelector.text
|
shareConnectionDrawer.configContentHeaderText = qsTr("File with accessing settings to ") + serverSelector.text
|
||||||
}
|
}
|
||||||
serverSelector.menuVisible = false
|
serverSelector.menuVisible = false
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
handler()
|
handler()
|
||||||
|
serverSelector.severSelectorIndexChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
function handler() {
|
function handler() {
|
||||||
|
@ -240,12 +241,14 @@ PageType {
|
||||||
DropDownType {
|
DropDownType {
|
||||||
id: protocolSelector
|
id: protocolSelector
|
||||||
|
|
||||||
|
visible: accessTypeSelector.currentIndex === 0
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 16
|
Layout.topMargin: 16
|
||||||
|
|
||||||
drawerHeight: 0.5
|
drawerHeight: 0.5
|
||||||
|
|
||||||
descriptionText: qsTr("Protocols")
|
descriptionText: qsTr("Protocol")
|
||||||
headerText: qsTr("Protocol")
|
headerText: qsTr("Protocol")
|
||||||
|
|
||||||
listView: ListViewWithRadioButtonType {
|
listView: ListViewWithRadioButtonType {
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
||||||
NotificationHandler(parent),
|
NotificationHandler(parent),
|
||||||
m_systemTrayIcon(parent)
|
m_systemTrayIcon(parent)
|
||||||
|
@ -26,8 +25,7 @@ SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
||||||
m_systemTrayIcon.show();
|
m_systemTrayIcon.show();
|
||||||
connect(&m_systemTrayIcon, &QSystemTrayIcon::activated, this, &SystemTrayNotificationHandler::onTrayActivated);
|
connect(&m_systemTrayIcon, &QSystemTrayIcon::activated, this, &SystemTrayNotificationHandler::onTrayActivated);
|
||||||
|
|
||||||
|
m_trayActionShow = m_menu.addAction(QIcon(":/images/tray/application.png"), tr("Show") + " " + APPLICATION_NAME, this, [this](){
|
||||||
m_menu.addAction(QIcon(":/images/tray/application.png"), tr("Show") + " " + APPLICATION_NAME, this, [this](){
|
|
||||||
emit raiseRequested();
|
emit raiseRequested();
|
||||||
});
|
});
|
||||||
m_menu.addSeparator();
|
m_menu.addSeparator();
|
||||||
|
@ -36,11 +34,11 @@ SystemTrayNotificationHandler::SystemTrayNotificationHandler(QObject* parent) :
|
||||||
|
|
||||||
m_menu.addSeparator();
|
m_menu.addSeparator();
|
||||||
|
|
||||||
m_menu.addAction(QIcon(":/images/tray/link.png"), tr("Visit Website"), [&](){
|
m_trayActionVisitWebSite = m_menu.addAction(QIcon(":/images/tray/link.png"), tr("Visit Website"), [&](){
|
||||||
QDesktopServices::openUrl(QUrl("https://amnezia.org"));
|
QDesktopServices::openUrl(QUrl("https://amnezia.org"));
|
||||||
});
|
});
|
||||||
|
|
||||||
m_menu.addAction(QIcon(":/images/tray/cancel.png"), tr("Quit") + " " + APPLICATION_NAME, this, [&](){
|
m_trayActionQuit = m_menu.addAction(QIcon(":/images/tray/cancel.png"), tr("Quit") + " " + APPLICATION_NAME, this, [&](){
|
||||||
qApp->quit();
|
qApp->quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -57,6 +55,15 @@ void SystemTrayNotificationHandler::setConnectionState(Vpn::ConnectionState stat
|
||||||
NotificationHandler::setConnectionState(state);
|
NotificationHandler::setConnectionState(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SystemTrayNotificationHandler::onTranslationsUpdated()
|
||||||
|
{
|
||||||
|
m_trayActionShow->setText(tr("Show") + " " + APPLICATION_NAME);
|
||||||
|
m_trayActionConnect->setText(tr("Connect"));
|
||||||
|
m_trayActionDisconnect->setText(tr("Disconnect"));
|
||||||
|
m_trayActionVisitWebSite->setText(tr("Visit Website"));
|
||||||
|
m_trayActionQuit->setText(tr("Quit")+ " " + APPLICATION_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
void SystemTrayNotificationHandler::setTrayIcon(const QString &iconPath)
|
void SystemTrayNotificationHandler::setTrayIcon(const QString &iconPath)
|
||||||
{
|
{
|
||||||
QIcon trayIconMask(QPixmap(iconPath).scaled(128,128));
|
QIcon trayIconMask(QPixmap(iconPath).scaled(128,128));
|
||||||
|
|
|
@ -19,6 +19,8 @@ public:
|
||||||
|
|
||||||
void setConnectionState(Vpn::ConnectionState state) override;
|
void setConnectionState(Vpn::ConnectionState state) override;
|
||||||
|
|
||||||
|
void onTranslationsUpdated() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void notify(Message type, const QString& title,
|
virtual void notify(Message type, const QString& title,
|
||||||
const QString& message, int timerMsec) override;
|
const QString& message, int timerMsec) override;
|
||||||
|
@ -35,9 +37,11 @@ private:
|
||||||
QMenu m_menu;
|
QMenu m_menu;
|
||||||
QSystemTrayIcon m_systemTrayIcon;
|
QSystemTrayIcon m_systemTrayIcon;
|
||||||
|
|
||||||
|
QAction* m_trayActionShow = nullptr;
|
||||||
QAction* m_trayActionConnect = nullptr;
|
QAction* m_trayActionConnect = nullptr;
|
||||||
QAction* m_trayActionDisconnect = nullptr;
|
QAction* m_trayActionDisconnect = nullptr;
|
||||||
QAction* m_preferencesAction = nullptr;
|
QAction* m_trayActionVisitWebSite = nullptr;
|
||||||
|
QAction* m_trayActionQuit = nullptr;
|
||||||
QAction* m_statusLabel = nullptr;
|
QAction* m_statusLabel = nullptr;
|
||||||
QAction* m_separator = nullptr;
|
QAction* m_separator = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue