mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
fixed screen fade when switching from PageSetupWizardStart to PageStart
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user