moved handling of connection states from qml in connectionController

- added a check for already installed containers before installing the server/container
- added a button to scan the server for installed containers
- added separation for read/write and readonly servers for pageHome
This commit is contained in:
vladimir.kuznetsov 2023-06-21 20:56:00 +09:00
parent 3a264e6baf
commit 249be451f7
21 changed files with 466 additions and 245 deletions

View file

@ -14,6 +14,21 @@ import "../Components"
PageType {
id: root
Connections {
target: InstallController
function onScanServerFinished(isInstalledContainerFound) {
var message = ""
if (isInstalledContainerFound) {
message = qsTr("All installed containers have been added to the application")
} else {
message = qsTr("Не найдено установленных контейнеров")
}
PageController.showErrorMessage(message)
}
}
FlickableType {
id: fl
anchors.top: parent.top
@ -30,8 +45,8 @@ PageType {
LabelWithButtonType {
Layout.fillWidth: true
text: "Clear Amnezia cache"
descriptionText: "May be needed when changing other settings"
text: qsTr("Clear Amnezia cache")
descriptionText: qsTr("May be needed when changing other settings")
clickedFunction: function() {
questionDrawer.headerText = qsTr("Clear cached profiles?")
@ -52,6 +67,19 @@ PageType {
DividerType {}
LabelWithButtonType {
Layout.fillWidth: true
text: qsTr("Проверить сервер на наличие ранее установленных сервисов Amnezia")
descriptionText: qsTr("Добавим их в приложение, если они не отображались")
clickedFunction: function() {
InstallController.scanServerForInstalledContainers()
}
}
DividerType {}
LabelWithButtonType {
Layout.fillWidth: true