added FlickableType to PageSettingsServerProtocols and PageSettingsServerServices

This commit is contained in:
vladimir.kuznetsov 2023-06-30 13:45:11 +09:00
parent b4eb317b00
commit 9b07909ed8
6 changed files with 103 additions and 71 deletions

View file

@ -3114,22 +3114,22 @@ AmneziaVPN detected this profile may contain malicious scripts. Please, carefull
<context>
<name>main</name>
<message>
<location filename="../ui/qml/main.qml" line="267"/>
<location filename="../ui/qml/main.qml" line="271"/>
<source>It&apos;s public key. Private key required</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/main.qml" line="308"/>
<location filename="../ui/qml/main.qml" line="312"/>
<source>Ssh log</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/main.qml" line="318"/>
<location filename="../ui/qml/main.qml" line="322"/>
<source>App log</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../ui/qml/main.qml" line="322"/>
<location filename="../ui/qml/main.qml" line="326"/>
<source>Wrap words</source>
<translation type="unfinished"></translation>
</message>

View file

@ -1,19 +1,15 @@
#include "protocolSettingsController.h"
ProtocolSettingsController::ProtocolSettingsController(
const QSharedPointer<ServersModel> &serversModel,
ProtocolSettingsController::ProtocolSettingsController(const QSharedPointer<ServersModel> &serversModel,
const QSharedPointer<ContainersModel> &containersModel,
const std::shared_ptr<Settings> &settings,
QObject *parent)
: QObject(parent)
, m_serversModel(serversModel)
, m_containersModel(containersModel)
, m_settings(settings)
{}
const std::shared_ptr<Settings> &settings, QObject *parent)
: QObject(parent), m_serversModel(serversModel), m_containersModel(containersModel), m_settings(settings)
{
}
QByteArray ProtocolSettingsController::getOpenVpnConfig()
{
auto containerIndex = m_containersModel->index(
m_containersModel->getCurrentlyProcessedContainerIndex());
auto containerIndex = m_containersModel->index(m_containersModel->getCurrentlyProcessedContainerIndex());
auto config = m_containersModel->data(containerIndex, ContainersModel::Roles::ConfigRole);
return QByteArray();
}

View file

@ -50,7 +50,7 @@ PageType {
anchors.left: parent.left
anchors.right: parent.right
property bool isServerWithWriteAccess: ServersModel.isCurrentlyProcessedServerHasWriteAccess() //todo make it property?
property bool isServerWithWriteAccess: ServersModel.isCurrentlyProcessedServerHasWriteAccess()
LabelWithButtonType {
visible: content.isServerWithWriteAccess

View file

@ -20,6 +20,19 @@ PageType {
property var installedProtocolsCount
FlickableType {
id: fl
anchors.top: parent.top
anchors.bottom: parent.bottom
contentHeight: content.implicitHeight
Column {
id: content
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
SettingsContainersListView {
id: settingsContainersListView
Connections {
@ -47,3 +60,5 @@ PageType {
Component.onCompleted: updateContainersModelFilters()
}
}
}
}

View file

@ -20,6 +20,19 @@ PageType {
property var installedServicesCount
FlickableType {
id: fl
anchors.top: parent.top
anchors.bottom: parent.bottom
contentHeight: content.implicitHeight
Column {
id: content
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
SettingsContainersListView {
id: settingsContainersListView
Connections {
@ -47,3 +60,5 @@ PageType {
Component.onCompleted: updateContainersModelFilters()
}
}
}
}

View file

@ -26,15 +26,27 @@ PageType {
roleName: "isSupported"
value: true
}
]
}
ColumnLayout {
id: backButton
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: 20
BackButtonType {
}
}
FlickableType {
id: fl
anchors.top: parent.top
anchors.top: backButton.top
anchors.bottom: parent.bottom
contentHeight: content.height
contentHeight: content.implicitHeight + content.anchors.topMargin + content.anchors.bottomMargin
Column {
id: content
@ -42,13 +54,7 @@ PageType {
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: 20
spacing: 16
BackButtonType {
width: parent.width
}
anchors.bottomMargin: 20
Item {
width: parent.width