fix: fixed multiple ui bugs (#37)

* removed unused lines in resources for local build

* fix: Amnezia Free subscription text visibility

* fix: add value to deactivateDevice to properly delete api server

* fix: reboot 'not api' servers instead of removing api

* fix: logging switch

* update: text

* fix: remove 'reset API' for some configs

* update: reboot removed

* fix: subscription end date text, cannot reset API or delete server during active connection

* fix: removed extra text after server renaming
This commit is contained in:
MrMirDan
2026-02-23 09:57:04 +02:00
committed by GitHub
parent 2ce899a7ed
commit 1abdd14741
2 changed files with 33 additions and 17 deletions

View File

@@ -91,7 +91,7 @@ Page {
}
XSmallTextType {
visible: !ApiAccountInfoModel.data("endDate").isEmpty()
visible: ApiAccountInfoModel.data("isProtocolSelectionSupported")
Layout.topMargin: 24
Layout.fillWidth: true
@@ -195,7 +195,7 @@ Page {
onConfirm: function(newName) {
ServersModel.setProcessedServerData("name", newName)
PageController.showNotificationMessage(qsTr("Server renamed successfully"))
header.text = newName + " " + qsTr("Amnezia Premium settings")
header.text = newName
}
}
@@ -207,9 +207,13 @@ Page {
cancelButtonText: qsTr("Cancel")
onConfirm: function() {
PageController.showBusyIndicator(true)
ApiConfigsController.updateServiceFromGateway(ServersModel.processedIndex, "", "", true)
PageController.showBusyIndicator(false)
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
PageController.showNotificationMessage(qsTr("Cannot reload API config during active connection"))
} else {
PageController.showBusyIndicator(true)
ApiConfigsController.updateServiceFromGateway(ServersModel.processedIndex, "", "", true)
PageController.showBusyIndicator(false)
}
}
}
@@ -221,12 +225,16 @@ Page {
cancelButtonText: qsTr("No, keep it")
onConfirm: function() {
PageController.showBusyIndicator(true)
if (ApiConfigsController.deactivateDevice(true)) {
InstallController.removeProcessedServer()
PageController.closePage()
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
PageController.showNotificationMessage(qsTr("Cannot remove server during active connection"))
} else {
PageController.showBusyIndicator(true)
if (ApiConfigsController.deactivateDevice(true)) {
InstallController.removeProcessedServer()
PageController.closePage()
}
PageController.showBusyIndicator(false)
}
PageController.showBusyIndicator(false)
}
}
}

View File

@@ -155,7 +155,7 @@ Page {
onConfirm: function(newName) {
ServersModel.setProcessedServerData("name", newName)
PageController.showNotificationMessage(qsTr("Server renamed successfully"))
header.text = newName + " " + qsTr("Server settings")
header.text = newName
}
}
@@ -166,9 +166,13 @@ Page {
cancelButtonText: qsTr("Cancel")
onConfirm: function() {
PageController.showBusyIndicator(true)
InstallController.removeApiConfig(ServersModel.processedIndex)
PageController.showBusyIndicator(false)
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
PageController.showNotificationMessage(qsTr("Cannot reload API config during active connection"))
} else {
PageController.showBusyIndicator(true)
InstallController.removeApiConfig(ServersModel.processedIndex)
PageController.showBusyIndicator(false)
}
}
}
@@ -180,9 +184,13 @@ Page {
cancelButtonText: qsTr("No, keep it")
onConfirm: function() {
PageController.showBusyIndicator(true)
InstallController.removeProcessedServer()
PageController.showBusyIndicator(false)
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
PageController.showNotificationMessage(qsTr("Cannot remove server during active connection"))
} else {
PageController.showBusyIndicator(true)
InstallController.removeProcessedServer()
PageController.showBusyIndicator(false)
}
}
}
}