mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-21 02:01:03 +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
75 lines
2.7 KiB
QML
75 lines
2.7 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
import PageEnum 1.0
|
|
|
|
import "../Controls2"
|
|
import "../Controls2/TextTypes"
|
|
|
|
|
|
ListViewType {
|
|
id: root
|
|
|
|
anchors.fill: parent
|
|
|
|
delegate: ColumnLayout {
|
|
width: root.width
|
|
|
|
LabelWithButtonType {
|
|
Layout.fillWidth: true
|
|
|
|
text: name
|
|
descriptionText: description
|
|
rightImageSource: isInstalled ? "qrc:/images/controls/chevron-right.svg" : "qrc:/images/controls/download.svg"
|
|
|
|
clickedFunction: function() {
|
|
if (isInstalled) {
|
|
var containerIndex = root.model.mapToSource(index)
|
|
ServersUiController.processedContainerIndex = containerIndex
|
|
|
|
if (isVpnContainer) {
|
|
// var isThirdPartyConfig = root.model.data(index, ContainersModel.IsThirdPartyConfigRole)
|
|
if (isThirdPartyConfig) {
|
|
InstallController.updateProtocols(ServersUiController.processedServerId, containerIndex)
|
|
PageController.goToPage(PageEnum.PageProtocolRaw)
|
|
return
|
|
}
|
|
}
|
|
|
|
if (isIpsec) {
|
|
InstallController.updateProtocols(ServersUiController.processedServerId, containerIndex)
|
|
PageController.goToPage(PageEnum.PageProtocolRaw)
|
|
} else if (isDns) {
|
|
PageController.goToPage(PageEnum.PageServiceDnsSettings)
|
|
} else if (isMtProxy) {
|
|
MtProxyConfigModel.updateModel(config)
|
|
PageController.goToPage(PageEnum.PageServiceMtProxySettings, false)
|
|
} else if (isTelemt) {
|
|
TelemtConfigModel.updateModel(config)
|
|
PageController.goToPage(PageEnum.PageServiceTelemtSettings, false)
|
|
} else {
|
|
InstallController.updateProtocols(ServersUiController.processedServerId, containerIndex)
|
|
PageController.goToPage(PageEnum.PageSettingsServerProtocol)
|
|
}
|
|
|
|
} else {
|
|
var containerIndex = root.model.mapToSource(index)
|
|
ServersUiController.processedContainerIndex = containerIndex
|
|
PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
|
|
}
|
|
}
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
cursorShape: Qt.PointingHandCursor
|
|
enabled: false
|
|
}
|
|
}
|
|
|
|
DividerType {}
|
|
}
|
|
}
|