diff --git a/client/ui/qml/Pages2/PageSetupWizardStart.qml b/client/ui/qml/Pages2/PageSetupWizardStart.qml index 698eacb3..89d4dc12 100644 --- a/client/ui/qml/Pages2/PageSetupWizardStart.qml +++ b/client/ui/qml/Pages2/PageSetupWizardStart.qml @@ -22,10 +22,6 @@ PageType { PageController.goToPage(PageEnum.PageSetupWizardViewConfig) } - function onShowBusyIndicator(visible) { - busyIndicator.visible = visible - } - function onClosePage() { if (stackView.depth <= 1) { return @@ -53,7 +49,7 @@ PageType { } function onEscapePressed() { - if (isControlsDisabled || busyIndicator.visible) { + if (isControlsDisabled) { return } @@ -159,10 +155,4 @@ PageType { ConnectionTypeSelectionDrawer { id: connectionTypeSelection } - - BusyIndicatorType { - id: busyIndicator - anchors.centerIn: parent - z: 1 - } } diff --git a/client/ui/qml/Pages2/PageStart.qml b/client/ui/qml/Pages2/PageStart.qml index ad007b48..3fd2d73c 100644 --- a/client/ui/qml/Pages2/PageStart.qml +++ b/client/ui/qml/Pages2/PageStart.qml @@ -14,6 +14,8 @@ import "../Components" PageType { id: root + property bool isControlsDisabled: false + Connections { target: PageController @@ -32,14 +34,8 @@ PageType { tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.PushTransition) } - function onShowBusyIndicator(visible) { - busyIndicator.visible = visible - tabBarStackView.enabled = !visible - tabBar.enabled = !visible - } - function onDisableControls(disabled) { - tabBar.enabled = !disabled + isControlsDisabled = disabled } function onClosePage() { @@ -67,7 +63,7 @@ PageType { } function onEscapePressed() { - if (!tabBar.enabled || busyIndicator.visible) { + if (root.isControlsDisabled) { return } @@ -136,6 +132,8 @@ PageType { width: parent.width height: root.height - tabBar.implicitHeight + enabled: !root.isControlsDisabled + function goToTabBarPage(page) { connectionTypeSelection.close() @@ -165,6 +163,8 @@ PageType { leftPadding: 96 rightPadding: 96 + enabled: !root.isControlsDisabled + background: Shape { width: parent.width height: parent.height @@ -236,12 +236,6 @@ PageType { } } - BusyIndicatorType { - id: busyIndicator - anchors.centerIn: parent - z: 1 - } - ConnectionTypeSelectionDrawer { id: connectionTypeSelection diff --git a/client/ui/qml/main2.qml b/client/ui/qml/main2.qml index bfecf46b..101ee06d 100644 --- a/client/ui/qml/main2.qml +++ b/client/ui/qml/main2.qml @@ -86,6 +86,11 @@ Window { function onGoToPageSettingsBackup() { PageController.goToPage(PageEnum.PageSettingsBackup) } + + function onShowBusyIndicator(visible) { + busyIndicator.visible = visible + PageController.disableControls(visible) + } } Connections { @@ -215,6 +220,16 @@ Window { } } + Item { + anchors.fill: parent + + BusyIndicatorType { + id: busyIndicator + anchors.centerIn: parent + z: 1 + } + } + function showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction) { questionDrawer.headerText = headerText questionDrawer.descriptionText = descriptionText