2024-08-20 16:54:05 +07:00
|
|
|
|
import QtQuick
|
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
|
import QtQuick.Layouts
|
|
|
|
|
|
import QtQuick.Dialogs
|
|
|
|
|
|
|
2025-01-31 10:06:35 +07:00
|
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
|
|
|
2024-08-20 16:54:05 +07:00
|
|
|
|
import PageEnum 1.0
|
|
|
|
|
|
import Style 1.0
|
|
|
|
|
|
|
|
|
|
|
|
import "./"
|
|
|
|
|
|
import "../Controls2"
|
|
|
|
|
|
import "../Controls2/TextTypes"
|
|
|
|
|
|
import "../Config"
|
|
|
|
|
|
import "../Components"
|
|
|
|
|
|
|
|
|
|
|
|
PageType {
|
|
|
|
|
|
id: root
|
|
|
|
|
|
|
2025-01-26 14:13:30 +07:00
|
|
|
|
property list<QtObject> labelsModel: [
|
2025-02-06 15:26:47 +07:00
|
|
|
|
statusObject,
|
2025-01-26 14:13:30 +07:00
|
|
|
|
endDateObject,
|
2025-02-06 15:26:47 +07:00
|
|
|
|
deviceCountObject
|
2025-01-26 14:13:30 +07:00
|
|
|
|
]
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-01-26 14:13:30 +07:00
|
|
|
|
QtObject {
|
2025-02-06 15:26:47 +07:00
|
|
|
|
id: statusObject
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-03-05 06:11:31 +03:00
|
|
|
|
readonly property string title: qsTr("Subscription Status")
|
2025-02-06 15:26:47 +07:00
|
|
|
|
readonly property string contentKey: "subscriptionStatus"
|
2025-02-28 18:17:43 +03:00
|
|
|
|
readonly property string objectImageSource: "qrc:/images/controls/info.svg"
|
2025-01-26 14:13:30 +07:00
|
|
|
|
}
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-01-26 14:13:30 +07:00
|
|
|
|
QtObject {
|
|
|
|
|
|
id: endDateObject
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-03-05 06:11:31 +03:00
|
|
|
|
readonly property string title: qsTr("Valid Until")
|
2025-01-26 14:13:30 +07:00
|
|
|
|
readonly property string contentKey: "endDate"
|
|
|
|
|
|
readonly property string objectImageSource: "qrc:/images/controls/history.svg"
|
|
|
|
|
|
}
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-01-26 14:13:30 +07:00
|
|
|
|
QtObject {
|
2025-02-06 15:26:47 +07:00
|
|
|
|
id: deviceCountObject
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-03-05 06:11:31 +03:00
|
|
|
|
readonly property string title: qsTr("Active Connections")
|
2025-02-06 15:26:47 +07:00
|
|
|
|
readonly property string contentKey: "connectedDevices"
|
2025-02-28 18:17:43 +03:00
|
|
|
|
readonly property string objectImageSource: "qrc:/images/controls/monitor.svg"
|
2025-01-26 14:13:30 +07:00
|
|
|
|
}
|
2024-12-09 09:32:49 +03:00
|
|
|
|
|
2025-01-31 10:06:35 +07:00
|
|
|
|
property var processedServer
|
|
|
|
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
|
target: ServersModel
|
|
|
|
|
|
|
|
|
|
|
|
function onProcessedServerChanged() {
|
|
|
|
|
|
root.processedServer = proxyServersModel.get(0)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SortFilterProxyModel {
|
|
|
|
|
|
id: proxyServersModel
|
|
|
|
|
|
objectName: "proxyServersModel"
|
|
|
|
|
|
|
|
|
|
|
|
sourceModel: ServersModel
|
|
|
|
|
|
filters: [
|
|
|
|
|
|
ValueFilter {
|
|
|
|
|
|
roleName: "isCurrentlyProcessed"
|
|
|
|
|
|
value: true
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
|
|
root.processedServer = proxyServersModel.get(0)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-02-06 15:26:47 +07:00
|
|
|
|
ListViewType {
|
2025-01-26 14:13:30 +07:00
|
|
|
|
id: listView
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-01-31 10:06:35 +07:00
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
|
|
|
|
model: labelsModel
|
|
|
|
|
|
|
|
|
|
|
|
header: ColumnLayout {
|
|
|
|
|
|
width: listView.width
|
|
|
|
|
|
|
|
|
|
|
|
spacing: 4
|
|
|
|
|
|
|
|
|
|
|
|
BackButtonType {
|
|
|
|
|
|
id: backButton
|
|
|
|
|
|
objectName: "backButton"
|
|
|
|
|
|
|
|
|
|
|
|
Layout.topMargin: 20
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-05-02 23:54:36 -07:00
|
|
|
|
HeaderTypeWithButton {
|
2025-01-31 10:06:35 +07:00
|
|
|
|
id: headerContent
|
|
|
|
|
|
objectName: "headerContent"
|
|
|
|
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
Layout.leftMargin: 16
|
|
|
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
|
Layout.bottomMargin: 10
|
|
|
|
|
|
|
|
|
|
|
|
actionButtonImage: "qrc:/images/controls/edit-3.svg"
|
|
|
|
|
|
|
|
|
|
|
|
headerText: root.processedServer.name
|
2025-02-07 22:22:14 +07:00
|
|
|
|
descriptionText: ApiAccountInfoModel.data("serviceDescription")
|
2025-01-31 10:06:35 +07:00
|
|
|
|
|
|
|
|
|
|
actionButtonFunction: function() {
|
|
|
|
|
|
serverNameEditDrawer.openTriggered()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
RenameServerDrawer {
|
|
|
|
|
|
id: serverNameEditDrawer
|
|
|
|
|
|
|
|
|
|
|
|
parent: root
|
|
|
|
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
expandedHeight: root.height * 0.35
|
|
|
|
|
|
|
|
|
|
|
|
serverNameText: root.processedServer.name
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-01-26 14:13:30 +07:00
|
|
|
|
|
|
|
|
|
|
delegate: ColumnLayout {
|
|
|
|
|
|
width: listView.width
|
|
|
|
|
|
spacing: 0
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-02-22 14:42:09 +07:00
|
|
|
|
Connections {
|
|
|
|
|
|
target: ApiAccountInfoModel
|
|
|
|
|
|
|
|
|
|
|
|
function onModelReset() {
|
|
|
|
|
|
delegateItem.rightText = ApiAccountInfoModel.data(contentKey)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-20 16:54:05 +07:00
|
|
|
|
LabelWithImageType {
|
2025-02-22 14:42:09 +07:00
|
|
|
|
id: delegateItem
|
|
|
|
|
|
|
2024-08-20 16:54:05 +07:00
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
Layout.margins: 16
|
|
|
|
|
|
|
2025-01-26 14:13:30 +07:00
|
|
|
|
imageSource: objectImageSource
|
|
|
|
|
|
leftText: title
|
2025-02-06 15:26:47 +07:00
|
|
|
|
rightText: ApiAccountInfoModel.data(contentKey)
|
2025-01-26 14:13:30 +07:00
|
|
|
|
|
|
|
|
|
|
visible: rightText !== ""
|
2024-08-20 16:54:05 +07:00
|
|
|
|
}
|
2025-01-26 14:13:30 +07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
footer: ColumnLayout {
|
2025-02-10 15:10:59 +07:00
|
|
|
|
id: footer
|
|
|
|
|
|
|
2025-01-26 14:13:30 +07:00
|
|
|
|
width: listView.width
|
|
|
|
|
|
spacing: 0
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-02-10 15:10:59 +07:00
|
|
|
|
readonly property bool isVisibleForAmneziaFree: ApiAccountInfoModel.data("isComponentVisible")
|
|
|
|
|
|
|
2025-02-28 18:17:43 +03:00
|
|
|
|
WarningType {
|
|
|
|
|
|
id: warning
|
|
|
|
|
|
|
|
|
|
|
|
Layout.topMargin: 32
|
|
|
|
|
|
Layout.rightMargin: 16
|
|
|
|
|
|
Layout.leftMargin: 16
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
|
|
backGroundColor: AmneziaStyle.color.translucentRichBrown
|
|
|
|
|
|
|
|
|
|
|
|
textString: qsTr("Configurations have been updated for some countries. Download and install the updated configuration files")
|
|
|
|
|
|
|
|
|
|
|
|
iconPath: "qrc:/images/controls/alert-circle.svg"
|
|
|
|
|
|
|
|
|
|
|
|
visible: ApiAccountInfoModel.data("hasExpiredWorker")
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-02-06 15:26:47 +07:00
|
|
|
|
LabelWithButtonType {
|
2025-02-07 22:22:14 +07:00
|
|
|
|
id: vpnKey
|
|
|
|
|
|
|
2024-08-20 16:54:05 +07:00
|
|
|
|
Layout.fillWidth: true
|
2025-02-28 18:17:43 +03:00
|
|
|
|
Layout.topMargin: warning.visible ? 16 : 32
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-02-23 14:26:04 +07:00
|
|
|
|
visible: false //footer.isVisibleForAmneziaFree
|
2025-02-06 15:26:47 +07:00
|
|
|
|
|
2025-03-05 06:11:31 +03:00
|
|
|
|
text: qsTr("Subscription Key")
|
2025-02-06 15:26:47 +07:00
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
2025-02-12 12:43:11 +07:00
|
|
|
|
shareConnectionDrawer.headerText = qsTr("Amnezia Premium subscription key")
|
|
|
|
|
|
|
|
|
|
|
|
shareConnectionDrawer.openTriggered()
|
2025-02-19 14:56:53 +07:00
|
|
|
|
shareConnectionDrawer.isSelfHostedConfig = false;
|
2025-03-05 06:11:31 +03:00
|
|
|
|
shareConnectionDrawer.shareButtonText = qsTr("Save VPN key as a file")
|
2025-02-12 12:43:11 +07:00
|
|
|
|
shareConnectionDrawer.copyButtonText = qsTr("Copy VPN key")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PageController.showBusyIndicator(true)
|
|
|
|
|
|
|
|
|
|
|
|
ApiConfigsController.prepareVpnKeyExport()
|
|
|
|
|
|
|
|
|
|
|
|
PageController.showBusyIndicator(false)
|
2024-08-20 16:54:05 +07:00
|
|
|
|
}
|
2025-02-06 15:26:47 +07:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-02-07 22:22:14 +07:00
|
|
|
|
DividerType {
|
2025-02-23 14:26:04 +07:00
|
|
|
|
visible: false //footer.isVisibleForAmneziaFree
|
2025-02-07 22:22:14 +07:00
|
|
|
|
}
|
2025-02-06 15:26:47 +07:00
|
|
|
|
|
|
|
|
|
|
LabelWithButtonType {
|
|
|
|
|
|
Layout.fillWidth: true
|
2025-02-28 18:17:43 +03:00
|
|
|
|
Layout.topMargin: warning.visible ? 16 : 32
|
2025-02-10 15:10:59 +07:00
|
|
|
|
|
|
|
|
|
|
visible: footer.isVisibleForAmneziaFree
|
2025-02-06 15:26:47 +07:00
|
|
|
|
|
2025-03-05 06:11:31 +03:00
|
|
|
|
text: qsTr("Configuration Files")
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-03-04 13:33:35 +07:00
|
|
|
|
descriptionText: qsTr("Manage configuration files")
|
2025-02-06 15:26:47 +07:00
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
2025-01-26 14:13:30 +07:00
|
|
|
|
|
2025-02-06 15:26:47 +07:00
|
|
|
|
clickedFunction: function() {
|
2025-02-07 22:22:14 +07:00
|
|
|
|
ApiSettingsController.updateApiCountryModel()
|
|
|
|
|
|
PageController.goToPage(PageEnum.PageSettingsApiNativeConfigs)
|
2024-08-20 16:54:05 +07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-02-10 15:10:59 +07:00
|
|
|
|
DividerType {
|
|
|
|
|
|
visible: footer.isVisibleForAmneziaFree
|
|
|
|
|
|
}
|
2025-02-06 15:26:47 +07:00
|
|
|
|
|
2025-02-28 18:17:43 +03:00
|
|
|
|
LabelWithButtonType {
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
|
|
|
|
visible: footer.isVisibleForAmneziaFree
|
|
|
|
|
|
|
2025-03-05 06:11:31 +03:00
|
|
|
|
text: qsTr("Active Devices")
|
2025-02-28 18:17:43 +03:00
|
|
|
|
|
2025-03-04 13:33:35 +07:00
|
|
|
|
descriptionText: qsTr("Manage currently connected devices")
|
2025-02-28 18:17:43 +03:00
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
|
|
|
|
|
ApiSettingsController.updateApiDevicesModel()
|
|
|
|
|
|
PageController.goToPage(PageEnum.PageSettingsApiDevices)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DividerType {
|
|
|
|
|
|
visible: footer.isVisibleForAmneziaFree
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-08-20 16:54:05 +07:00
|
|
|
|
LabelWithButtonType {
|
|
|
|
|
|
Layout.fillWidth: true
|
2025-02-10 15:10:59 +07:00
|
|
|
|
Layout.topMargin: footer.isVisibleForAmneziaFree ? 0 : 32
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-02-06 15:26:47 +07:00
|
|
|
|
text: qsTr("Support")
|
|
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
|
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
|
|
|
|
|
PageController.goToPage(PageEnum.PageSettingsApiSupport)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DividerType {}
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-02-06 15:26:47 +07:00
|
|
|
|
LabelWithButtonType {
|
|
|
|
|
|
Layout.fillWidth: true
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-03-04 13:33:35 +07:00
|
|
|
|
visible: footer.isVisibleForAmneziaFree
|
|
|
|
|
|
|
2025-02-21 14:15:23 +07:00
|
|
|
|
text: qsTr("How to connect on another device")
|
2025-02-06 15:26:47 +07:00
|
|
|
|
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
|
|
|
|
|
clickedFunction: function() {
|
2025-02-06 15:26:47 +07:00
|
|
|
|
PageController.goToPage(PageEnum.PageSettingsApiInstructions)
|
2024-08-20 16:54:05 +07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-03-04 13:33:35 +07:00
|
|
|
|
DividerType {
|
|
|
|
|
|
visible: footer.isVisibleForAmneziaFree
|
|
|
|
|
|
}
|
2025-02-06 15:26:47 +07:00
|
|
|
|
|
2024-08-20 16:54:05 +07:00
|
|
|
|
BasicButtonType {
|
|
|
|
|
|
id: resetButton
|
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
|
Layout.topMargin: 24
|
|
|
|
|
|
Layout.bottomMargin: 16
|
|
|
|
|
|
Layout.leftMargin: 8
|
|
|
|
|
|
implicitHeight: 32
|
|
|
|
|
|
|
|
|
|
|
|
defaultColor: "transparent"
|
2024-11-06 09:57:39 +04:00
|
|
|
|
hoveredColor: AmneziaStyle.color.translucentWhite
|
|
|
|
|
|
pressedColor: AmneziaStyle.color.sheerWhite
|
2024-08-20 16:54:05 +07:00
|
|
|
|
textColor: AmneziaStyle.color.vibrantRed
|
|
|
|
|
|
|
|
|
|
|
|
text: qsTr("Reload API config")
|
|
|
|
|
|
|
|
|
|
|
|
clickedFunc: function() {
|
|
|
|
|
|
var headerText = qsTr("Reload API config?")
|
|
|
|
|
|
var yesButtonText = qsTr("Continue")
|
|
|
|
|
|
var noButtonText = qsTr("Cancel")
|
|
|
|
|
|
|
|
|
|
|
|
var yesButtonFunction = function() {
|
|
|
|
|
|
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
|
|
|
|
|
|
PageController.showNotificationMessage(qsTr("Cannot reload API config during active connection"))
|
|
|
|
|
|
} else {
|
|
|
|
|
|
PageController.showBusyIndicator(true)
|
2025-02-15 11:50:42 +07:00
|
|
|
|
ApiConfigsController.updateServiceFromGateway(ServersModel.processedIndex, "", "", true)
|
2024-08-20 16:54:05 +07:00
|
|
|
|
PageController.showBusyIndicator(false)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
var noButtonFunction = function() {
|
2025-02-20 13:44:19 +07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BasicButtonType {
|
|
|
|
|
|
id: revokeButton
|
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
|
Layout.bottomMargin: 16
|
|
|
|
|
|
Layout.leftMargin: 8
|
|
|
|
|
|
implicitHeight: 32
|
|
|
|
|
|
|
2025-02-21 14:15:23 +07:00
|
|
|
|
visible: footer.isVisibleForAmneziaFree
|
|
|
|
|
|
|
2025-02-20 13:44:19 +07:00
|
|
|
|
defaultColor: "transparent"
|
|
|
|
|
|
hoveredColor: AmneziaStyle.color.translucentWhite
|
|
|
|
|
|
pressedColor: AmneziaStyle.color.sheerWhite
|
|
|
|
|
|
textColor: AmneziaStyle.color.vibrantRed
|
|
|
|
|
|
|
2025-03-04 13:33:35 +07:00
|
|
|
|
text: qsTr("Unlink this device")
|
2025-02-20 13:44:19 +07:00
|
|
|
|
|
|
|
|
|
|
clickedFunc: function() {
|
2025-03-04 13:33:35 +07:00
|
|
|
|
var headerText = qsTr("Are you sure you want to unlink this device?")
|
|
|
|
|
|
var descriptionText = qsTr("This will unlink the device from your subscription. You can reconnect it anytime by pressing Connect.")
|
2025-02-20 13:44:19 +07:00
|
|
|
|
var yesButtonText = qsTr("Continue")
|
|
|
|
|
|
var noButtonText = qsTr("Cancel")
|
|
|
|
|
|
|
|
|
|
|
|
var yesButtonFunction = function() {
|
|
|
|
|
|
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
|
2025-03-04 13:33:35 +07:00
|
|
|
|
PageController.showNotificationMessage(qsTr("Cannot unlink device during active connection"))
|
2025-02-20 13:44:19 +07:00
|
|
|
|
} else {
|
|
|
|
|
|
PageController.showBusyIndicator(true)
|
|
|
|
|
|
if (ApiConfigsController.deactivateDevice()) {
|
2025-02-22 14:42:09 +07:00
|
|
|
|
ApiSettingsController.getAccountInfo(true)
|
2025-02-20 13:44:19 +07:00
|
|
|
|
}
|
|
|
|
|
|
PageController.showBusyIndicator(false)
|
2024-08-20 16:54:05 +07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-02-20 13:44:19 +07:00
|
|
|
|
var noButtonFunction = function() {
|
|
|
|
|
|
}
|
2024-08-20 16:54:05 +07:00
|
|
|
|
|
2025-02-28 18:17:43 +03:00
|
|
|
|
showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
|
2024-08-20 16:54:05 +07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BasicButtonType {
|
|
|
|
|
|
id: removeButton
|
|
|
|
|
|
Layout.alignment: Qt.AlignHCenter
|
|
|
|
|
|
Layout.bottomMargin: 16
|
|
|
|
|
|
Layout.leftMargin: 8
|
|
|
|
|
|
implicitHeight: 32
|
|
|
|
|
|
|
|
|
|
|
|
defaultColor: "transparent"
|
2024-11-06 09:57:39 +04:00
|
|
|
|
hoveredColor: AmneziaStyle.color.translucentWhite
|
|
|
|
|
|
pressedColor: AmneziaStyle.color.sheerWhite
|
2024-08-20 16:54:05 +07:00
|
|
|
|
textColor: AmneziaStyle.color.vibrantRed
|
|
|
|
|
|
|
|
|
|
|
|
text: qsTr("Remove from application")
|
|
|
|
|
|
|
|
|
|
|
|
clickedFunc: function() {
|
|
|
|
|
|
var headerText = qsTr("Remove from application?")
|
|
|
|
|
|
var yesButtonText = qsTr("Continue")
|
|
|
|
|
|
var noButtonText = qsTr("Cancel")
|
|
|
|
|
|
|
|
|
|
|
|
var yesButtonFunction = function() {
|
|
|
|
|
|
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
|
|
|
|
|
|
PageController.showNotificationMessage(qsTr("Cannot remove server during active connection"))
|
|
|
|
|
|
} else {
|
|
|
|
|
|
PageController.showBusyIndicator(true)
|
2025-02-23 14:26:04 +07:00
|
|
|
|
if (ApiConfigsController.deactivateDevice()) {
|
|
|
|
|
|
InstallController.removeProcessedServer()
|
|
|
|
|
|
}
|
2024-08-20 16:54:05 +07:00
|
|
|
|
PageController.showBusyIndicator(false)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
var noButtonFunction = function() {
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
showQuestionDrawer(headerText, "", yesButtonText, noButtonText, yesButtonFunction, noButtonFunction)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-02-12 12:43:11 +07:00
|
|
|
|
|
|
|
|
|
|
ShareConnectionDrawer {
|
|
|
|
|
|
id: shareConnectionDrawer
|
|
|
|
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
}
|
2024-08-20 16:54:05 +07:00
|
|
|
|
}
|