mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
f9b106cf5b
* fix: fixed country model update * fix: fixed context menu crush on ios * fix: fixed passphrase dialog freeze * fix: fixed country switch * fix: fixed start minimized * fix: fixed black screen after remove container * refactor: return cloak and ss only for view * fix: fixed default server change after improt while connected * fix: divider visibility * fix: fixed revoke admin user * fix: fixed language restore after backup * fix: link hover for tor settings page * fix: fixed openvpn connecntion status * fix: fixed free color status * fix: fixed client config update * chore: bump version
108 lines
2.7 KiB
QML
108 lines
2.7 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
import PageEnum 1.0
|
|
import Style 1.0
|
|
|
|
import "./"
|
|
import "../Controls2"
|
|
import "../Config"
|
|
|
|
PageType {
|
|
id: root
|
|
|
|
SortFilterProxyModel {
|
|
id: proxyContainersModel
|
|
sourceModel: ContainersModel
|
|
filters: [
|
|
ValueFilter {
|
|
roleName: "isVpnContainer"
|
|
value: true
|
|
},
|
|
ValueFilter {
|
|
roleName: "isSupported"
|
|
value: true
|
|
},
|
|
ValueFilter {
|
|
roleName: "isInstallationAllowed"
|
|
value: true
|
|
},
|
|
ValueFilter {
|
|
roleName: "isUnsupportedContainer"
|
|
value: false
|
|
}
|
|
]
|
|
sorters: RoleSorter {
|
|
roleName: "installPageOrder"
|
|
sortOrder: Qt.AscendingOrder
|
|
}
|
|
}
|
|
|
|
BackButtonType {
|
|
id: backButton
|
|
|
|
anchors.top: parent.top
|
|
anchors.left: parent.left
|
|
anchors.right: parent.right
|
|
|
|
anchors.topMargin: 20 + PageController.safeAreaTopMargin
|
|
|
|
onActiveFocusChanged: {
|
|
if(backButton.enabled && backButton.activeFocus) {
|
|
listView.positionViewAtBeginning()
|
|
}
|
|
}
|
|
}
|
|
|
|
ListViewType {
|
|
id: listView
|
|
anchors.top: backButton.bottom
|
|
anchors.bottom: parent.bottom
|
|
anchors.right: parent.right
|
|
anchors.left: parent.left
|
|
|
|
header: ColumnLayout {
|
|
width: listView.width
|
|
|
|
BaseHeaderType {
|
|
id: header
|
|
|
|
Layout.fillWidth: true
|
|
Layout.leftMargin: 16
|
|
Layout.rightMargin: 16
|
|
Layout.bottomMargin: 16
|
|
|
|
headerText: qsTr("VPN protocol")
|
|
descriptionText: qsTr("Choose the one with the highest priority for you. Later, you can install other protocols and additional services, such as DNS proxy and SFTP.")
|
|
}
|
|
}
|
|
|
|
model: proxyContainersModel
|
|
|
|
spacing: 0
|
|
snapMode: ListView.SnapToItem
|
|
|
|
delegate: ColumnLayout {
|
|
width: listView.width
|
|
|
|
LabelWithButtonType {
|
|
Layout.fillWidth: true
|
|
|
|
text: name
|
|
descriptionText: description
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
clickedFunction: function () {
|
|
ServersUiController.processedContainerIndex = proxyContainersModel.mapToSource(index)
|
|
PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings);
|
|
}
|
|
}
|
|
|
|
DividerType {}
|
|
}
|
|
}
|
|
}
|