Merge pull request #671 from amnezia-vpn/bugfix/fade-on-page-start-repalce

fixed screen fade when switching from PageSetupWizardStart to PageStart
This commit is contained in:
pokamest
2024-03-06 06:36:07 -08:00
committed by GitHub
3 changed files with 24 additions and 25 deletions
+1 -11
View File
@@ -22,10 +22,6 @@ PageType {
PageController.goToPage(PageEnum.PageSetupWizardViewConfig) PageController.goToPage(PageEnum.PageSetupWizardViewConfig)
} }
function onShowBusyIndicator(visible) {
busyIndicator.visible = visible
}
function onClosePage() { function onClosePage() {
if (stackView.depth <= 1) { if (stackView.depth <= 1) {
return return
@@ -53,7 +49,7 @@ PageType {
} }
function onEscapePressed() { function onEscapePressed() {
if (isControlsDisabled || busyIndicator.visible) { if (isControlsDisabled) {
return return
} }
@@ -159,10 +155,4 @@ PageType {
ConnectionTypeSelectionDrawer { ConnectionTypeSelectionDrawer {
id: connectionTypeSelection id: connectionTypeSelection
} }
BusyIndicatorType {
id: busyIndicator
anchors.centerIn: parent
z: 1
}
} }
+8 -14
View File
@@ -14,6 +14,8 @@ import "../Components"
PageType { PageType {
id: root id: root
property bool isControlsDisabled: false
Connections { Connections {
target: PageController target: PageController
@@ -32,14 +34,8 @@ PageType {
tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.PushTransition) tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.PushTransition)
} }
function onShowBusyIndicator(visible) {
busyIndicator.visible = visible
tabBarStackView.enabled = !visible
tabBar.enabled = !visible
}
function onDisableControls(disabled) { function onDisableControls(disabled) {
tabBar.enabled = !disabled isControlsDisabled = disabled
} }
function onClosePage() { function onClosePage() {
@@ -67,7 +63,7 @@ PageType {
} }
function onEscapePressed() { function onEscapePressed() {
if (!tabBar.enabled || busyIndicator.visible) { if (root.isControlsDisabled) {
return return
} }
@@ -136,6 +132,8 @@ PageType {
width: parent.width width: parent.width
height: root.height - tabBar.implicitHeight height: root.height - tabBar.implicitHeight
enabled: !root.isControlsDisabled
function goToTabBarPage(page) { function goToTabBarPage(page) {
connectionTypeSelection.close() connectionTypeSelection.close()
@@ -165,6 +163,8 @@ PageType {
leftPadding: 96 leftPadding: 96
rightPadding: 96 rightPadding: 96
enabled: !root.isControlsDisabled
background: Shape { background: Shape {
width: parent.width width: parent.width
height: parent.height height: parent.height
@@ -236,12 +236,6 @@ PageType {
} }
} }
BusyIndicatorType {
id: busyIndicator
anchors.centerIn: parent
z: 1
}
ConnectionTypeSelectionDrawer { ConnectionTypeSelectionDrawer {
id: connectionTypeSelection id: connectionTypeSelection
+15
View File
@@ -86,6 +86,11 @@ Window {
function onGoToPageSettingsBackup() { function onGoToPageSettingsBackup() {
PageController.goToPage(PageEnum.PageSettingsBackup) PageController.goToPage(PageEnum.PageSettingsBackup)
} }
function onShowBusyIndicator(visible) {
busyIndicator.visible = visible
PageController.disableControls(visible)
}
} }
Connections { 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) { function showQuestionDrawer(headerText, descriptionText, yesButtonText, noButtonText, yesButtonFunction, noButtonFunction) {
questionDrawer.headerText = headerText questionDrawer.headerText = headerText
questionDrawer.descriptionText = descriptionText questionDrawer.descriptionText = descriptionText