* refactor: remove serverConfig struct * refactor: add warnings for api v1 configs * refactor: moved the server type definition to a separate namespace * refactor: simplified gateway stacks * fix: fixed server description * fix: fixed postAsync reply usage * fix: fixed validateConfig call * fix: fixed server name in notifications * fix: fixed initPrepareConfigHandler for lagacy configs
69 lines
2.4 KiB
QML
69 lines
2.4 KiB
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Layouts
|
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
import PageEnum 1.0
|
|
import ContainerProps 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.getServerId(ServersUiController.processedServerIndex), containerIndex)
|
|
PageController.goToPage(PageEnum.PageProtocolRaw)
|
|
return
|
|
}
|
|
}
|
|
|
|
if (isIpsec) {
|
|
InstallController.updateProtocols(ServersUiController.getServerId(ServersUiController.processedServerIndex), containerIndex)
|
|
PageController.goToPage(PageEnum.PageProtocolRaw)
|
|
} else if (isDns) {
|
|
PageController.goToPage(PageEnum.PageServiceDnsSettings)
|
|
} else {
|
|
InstallController.updateProtocols(ServersUiController.getServerId(ServersUiController.processedServerIndex), 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 {}
|
|
}
|
|
}
|