refactor: remove serverConfig struct (#2595)

* 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
This commit is contained in:
vkamn
2026-05-15 12:33:36 +08:00
committed by GitHub
parent 009ca981d5
commit 06372c8fd7
123 changed files with 3558 additions and 3026 deletions
@@ -111,7 +111,7 @@ PageType {
readonly property var tColor: AmneziaStyle.color.paleGray
readonly property var clickedHandler: function() {
PageController.showBusyIndicator(true)
InstallController.scanServerForInstalledContainers(ServersUiController.processedIndex)
InstallController.scanServerForInstalledContainers(ServersUiController.getServerId(ServersUiController.processedServerIndex))
PageController.showBusyIndicator(false)
}
}
@@ -134,7 +134,7 @@ PageType {
PageController.showNotificationMessage(qsTr("Cannot reboot server during active connection"))
} else {
PageController.showBusyIndicator(true)
InstallController.rebootServer(ServersUiController.processedIndex)
InstallController.rebootServer(ServersUiController.getServerId(ServersUiController.processedServerIndex))
PageController.showBusyIndicator(false)
}
}
@@ -164,7 +164,7 @@ PageType {
PageController.showNotificationMessage(qsTr("Cannot remove server during active connection"))
} else {
PageController.showBusyIndicator(true)
InstallController.removeServer(ServersUiController.processedIndex)
InstallController.removeServer(ServersUiController.getServerId(ServersUiController.processedServerIndex))
PageController.showBusyIndicator(false)
}
}
@@ -194,7 +194,7 @@ PageType {
PageController.showNotificationMessage(qsTr("Cannot clear server from Amnezia software during active connection"))
} else {
PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeAllContainers(ServersUiController.processedIndex)
InstallController.removeAllContainers(ServersUiController.getServerId(ServersUiController.processedServerIndex))
}
}
var noButtonFunction = function() {
@@ -223,7 +223,7 @@ PageType {
PageController.showNotificationMessage(qsTr("Cannot reset API config during active connection"))
} else {
PageController.showBusyIndicator(true)
SubscriptionUiController.removeApiConfig(ServersUiController.processedIndex)
SubscriptionUiController.removeApiConfig(ServersUiController.getServerId(ServersUiController.processedServerIndex))
PageController.showBusyIndicator(false)
}
}