added swipe up for menu on PageHome

This commit is contained in:
vladimir.kuznetsov 2023-09-06 13:37:37 +05:00
parent 7fc4ea0c68
commit 4ab006f065
28 changed files with 90 additions and 85 deletions

View file

@ -79,6 +79,8 @@ public slots:
void showOnStartup(); void showOnStartup();
signals: signals:
void goToPage(PageLoader::PageEnum page, bool slide = true);
void goToStartPage();
void goToPageHome(); void goToPageHome();
void goToPageSettings(); void goToPageSettings();
void goToPageViewConfig(); void goToPageViewConfig();

View file

@ -41,7 +41,7 @@ DrawerType {
rightImageSource: "qrc:/images/controls/chevron-right.svg" rightImageSource: "qrc:/images/controls/chevron-right.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSetupWizardCredentials) PageController.goToPage(PageEnum.PageSetupWizardCredentials)
root.visible = false root.visible = false
} }
} }
@ -55,7 +55,7 @@ DrawerType {
rightImageSource: "qrc:/images/controls/chevron-right.svg" rightImageSource: "qrc:/images/controls/chevron-right.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSetupWizardConfigSource) PageController.goToPage(PageEnum.PageSetupWizardConfigSource)
root.visible = false root.visible = false
} }
} }

View file

@ -67,7 +67,7 @@ ListView {
} else { } else {
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index)) ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
InstallController.setShouldCreateServer(false) InstallController.setShouldCreateServer(false)
goToPage(PageEnum.PageSetupWizardProtocolSettings) PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
containersDropDown.menuVisible = false containersDropDown.menuVisible = false
menu.visible = false menu.visible = false
} }

View file

@ -45,44 +45,44 @@ ListView {
if (config[ContainerProps.containerTypeToString(containerIndex)]["isThirdPartyConfig"]) { if (config[ContainerProps.containerTypeToString(containerIndex)]["isThirdPartyConfig"]) {
ProtocolsModel.updateModel(config) ProtocolsModel.updateModel(config)
goToPage(PageEnum.PageProtocolRaw) PageController.goToPage(PageEnum.PageProtocolRaw)
return return
} }
switch (containerIndex) { switch (containerIndex) {
case ContainerEnum.OpenVpn: { case ContainerEnum.OpenVpn: {
OpenVpnConfigModel.updateModel(config) OpenVpnConfigModel.updateModel(config)
goToPage(PageEnum.PageProtocolOpenVpnSettings) PageController.goToPage(PageEnum.PageProtocolOpenVpnSettings)
break break
} }
case ContainerEnum.WireGuard: { case ContainerEnum.WireGuard: {
ProtocolsModel.updateModel(config) ProtocolsModel.updateModel(config)
goToPage(PageEnum.PageProtocolRaw) PageController.goToPage(PageEnum.PageProtocolRaw)
// WireGuardConfigModel.updateModel(config) // WireGuardConfigModel.updateModel(config)
// goToPage(PageEnum.PageProtocolWireGuardSettings) // goToPage(PageEnum.PageProtocolWireGuardSettings)
break break
} }
case ContainerEnum.Ipsec: { case ContainerEnum.Ipsec: {
ProtocolsModel.updateModel(config) ProtocolsModel.updateModel(config)
goToPage(PageEnum.PageProtocolRaw) PageController.goToPage(PageEnum.PageProtocolRaw)
// Ikev2ConfigModel.updateModel(config) // Ikev2ConfigModel.updateModel(config)
// goToPage(PageEnum.PageProtocolIKev2Settings) // goToPage(PageEnum.PageProtocolIKev2Settings)
break break
} }
case ContainerEnum.Sftp: { case ContainerEnum.Sftp: {
SftpConfigModel.updateModel(config) SftpConfigModel.updateModel(config)
goToPage(PageEnum.PageServiceSftpSettings) PageController.goToPage(PageEnum.PageServiceSftpSettings)
break break
} }
case ContainerEnum.TorWebSite: { case ContainerEnum.TorWebSite: {
goToPage(PageEnum.PageServiceTorWebsiteSettings) PageController.goToPage(PageEnum.PageServiceTorWebsiteSettings)
break break
} }
default: { default: {
if (serviceType !== ProtocolEnum.Other) { //todo disable settings for dns container if (serviceType !== ProtocolEnum.Other) { //todo disable settings for dns container
ProtocolsModel.updateModel(config) ProtocolsModel.updateModel(config)
goToPage(PageEnum.PageSettingsServerProtocol) PageController.goToPage(PageEnum.PageSettingsServerProtocol)
} }
} }
} }
@ -90,7 +90,7 @@ ListView {
} else { } else {
ContainersModel.setCurrentlyProcessedContainerIndex(root.model.mapToSource(index)) ContainersModel.setCurrentlyProcessedContainerIndex(root.model.mapToSource(index))
InstallController.setShouldCreateServer(false) InstallController.setShouldCreateServer(false)
goToPage(PageEnum.PageSetupWizardProtocolSettings) PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
} }
} }

View file

@ -27,7 +27,7 @@ Item {
if (backButtonFunction && typeof backButtonFunction === "function") { if (backButtonFunction && typeof backButtonFunction === "function") {
backButtonFunction() backButtonFunction()
} else { } else {
closePage() PageController.closePage()
} }
} }
} }

View file

@ -6,6 +6,7 @@ Drawer {
clip: true clip: true
modal: true modal: true
dragMargin: -10
enter: Transition { enter: Transition {
SmoothedAnimation { SmoothedAnimation {

View file

@ -7,35 +7,15 @@ Item {
property StackView stackView: StackView.view property StackView stackView: StackView.view
function goToPage(page, slide = true) {
var pagePath = PageController.getPagePath(page)
if (slide) {
root.stackView.push(pagePath, { "objectName" : pagePath }, StackView.PushTransition)
} else {
root.stackView.push(pagePath, { "objectName" : pagePath }, StackView.Immediate)
}
}
function closePage() {
if (root.stackView.depth <= 1) {
return
}
root.stackView.pop()
}
function goToStartPage() {
while (root.stackView.depth > 1) {
root.stackView.pop()
}
}
MouseArea { MouseArea {
z: -1 z: 99
anchors.fill: parent anchors.fill: parent
onClicked: { enabled: true
console.log("base mouse area pressed")
focus = true onPressed: function(mouse) {
forceActiveFocus()
mouse.accepted = false
} }
} }
} }

View file

@ -26,11 +26,15 @@ PageType {
property string defaultServerHostName: ServersModel.defaultServerHostName property string defaultServerHostName: ServersModel.defaultServerHostName
property string defaultContainerName: ContainersModel.defaultContainerName property string defaultContainerName: ContainersModel.defaultContainerName
ConnectButton { Item {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: buttonBackground.top anchors.bottom: buttonBackground.top
anchors.right: parent.right anchors.right: parent.right
anchors.left: parent.left anchors.left: parent.left
ConnectButton {
anchors.centerIn: parent
}
} }
Connections { Connections {
@ -125,6 +129,9 @@ PageType {
DrawerType { DrawerType {
id: menu id: menu
interactive: true
dragMargin: buttonBackground.height + 56 // page start tabBar height
width: parent.width width: parent.width
height: parent.height * 0.9 height: parent.height * 0.9
@ -320,7 +327,7 @@ PageType {
onClicked: function() { onClicked: function() {
ServersModel.currentlyProcessedIndex = index ServersModel.currentlyProcessedIndex = index
goToPage(PageEnum.PageSettingsServerInfo) PageController.goToPage(PageEnum.PageSettingsServerInfo)
menu.visible = false menu.visible = false
} }
} }

View file

@ -368,7 +368,7 @@ PageType {
questionDrawer.yesButtonFunction = function() { questionDrawer.yesButtonFunction = function() {
questionDrawer.visible = false questionDrawer.visible = false
goToPage(PageEnum.PageDeinstalling) PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeCurrentlyProcessedContainer() InstallController.removeCurrentlyProcessedContainer()
} }
questionDrawer.noButtonFunction = function() { questionDrawer.noButtonFunction = function() {

View file

@ -180,7 +180,7 @@ PageType {
questionDrawer.yesButtonFunction = function() { questionDrawer.yesButtonFunction = function() {
questionDrawer.visible = false questionDrawer.visible = false
goToPage(PageEnum.PageDeinstalling) PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeCurrentlyProcessedContainer() InstallController.removeCurrentlyProcessedContainer()
} }
questionDrawer.noButtonFunction = function() { questionDrawer.noButtonFunction = function() {

View file

@ -259,7 +259,7 @@ PageType {
questionDrawer.yesButtonFunction = function() { questionDrawer.yesButtonFunction = function() {
questionDrawer.visible = false questionDrawer.visible = false
goToPage(PageEnum.PageDeinstalling) PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeCurrentlyProcessedContainer() InstallController.removeCurrentlyProcessedContainer()
} }
questionDrawer.noButtonFunction = function() { questionDrawer.noButtonFunction = function() {

View file

@ -144,7 +144,7 @@ PageType {
questionDrawer.yesButtonFunction = function() { questionDrawer.yesButtonFunction = function() {
questionDrawer.visible = false questionDrawer.visible = false
goToPage(PageEnum.PageDeinstalling) PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeCurrentlyProcessedContainer() InstallController.removeCurrentlyProcessedContainer()
} }
questionDrawer.noButtonFunction = function() { questionDrawer.noButtonFunction = function() {

View file

@ -46,7 +46,7 @@ PageType {
leftImageSource: "qrc:/images/controls/server.svg" leftImageSource: "qrc:/images/controls/server.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSettingsServersList) PageController.goToPage(PageEnum.PageSettingsServersList)
} }
} }
@ -60,7 +60,7 @@ PageType {
leftImageSource: "qrc:/images/controls/radio.svg" leftImageSource: "qrc:/images/controls/radio.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSettingsConnection) PageController.goToPage(PageEnum.PageSettingsConnection)
} }
} }
@ -74,7 +74,7 @@ PageType {
leftImageSource: "qrc:/images/controls/app.svg" leftImageSource: "qrc:/images/controls/app.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSettingsApplication) PageController.goToPage(PageEnum.PageSettingsApplication)
} }
} }
@ -88,7 +88,7 @@ PageType {
leftImageSource: "qrc:/images/controls/save.svg" leftImageSource: "qrc:/images/controls/save.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSettingsBackup) PageController.goToPage(PageEnum.PageSettingsBackup)
} }
} }
@ -102,7 +102,7 @@ PageType {
leftImageSource: "qrc:/images/controls/amnezia.svg" leftImageSource: "qrc:/images/controls/amnezia.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSettingsAbout) PageController.goToPage(PageEnum.PageSettingsAbout)
} }
} }

View file

@ -112,7 +112,7 @@ PageType {
rightImageSource: "qrc:/images/controls/chevron-right.svg" rightImageSource: "qrc:/images/controls/chevron-right.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSettingsLogging) PageController.goToPage(PageEnum.PageSettingsLogging)
} }
} }

View file

@ -86,7 +86,7 @@ PageType {
rightImageSource: "qrc:/images/controls/chevron-right.svg" rightImageSource: "qrc:/images/controls/chevron-right.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSettingsDns) PageController.goToPage(PageEnum.PageSettingsDns)
} }
} }
@ -100,7 +100,7 @@ PageType {
rightImageSource: "qrc:/images/controls/chevron-right.svg" rightImageSource: "qrc:/images/controls/chevron-right.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSettingsSplitTunneling) PageController.goToPage(PageEnum.PageSettingsSplitTunneling)
} }
} }

View file

@ -32,20 +32,20 @@ PageType {
if (!ServersModel.getServersCount()) { if (!ServersModel.getServersCount()) {
PageController.replaceStartPage() PageController.replaceStartPage()
} else { } else {
goToStartPage() PageController.goToStartPage()
goToPage(PageEnum.PageSettingsServersList) PageController.goToPage(PageEnum.PageSettingsServersList)
} }
PageController.showNotificationMessage(finishedMessage) PageController.showNotificationMessage(finishedMessage)
} }
function onRemoveAllContainersFinished(finishedMessage) { function onRemoveAllContainersFinished(finishedMessage) {
closePage() // close deInstalling page PageController.closePage() // close deInstalling page
PageController.showNotificationMessage(finishedMessage) PageController.showNotificationMessage(finishedMessage)
} }
function onRemoveCurrentlyProcessedContainerFinished(finishedMessage) { function onRemoveCurrentlyProcessedContainerFinished(finishedMessage) {
closePage() // close deInstalling page PageController.closePage() // close deInstalling page
closePage() // close page with remove button PageController.closePage() // close page with remove button
PageController.showNotificationMessage(finishedMessage) PageController.showNotificationMessage(finishedMessage)
} }
} }
@ -173,7 +173,7 @@ PageType {
questionDrawer.yesButtonFunction = function() { questionDrawer.yesButtonFunction = function() {
questionDrawer.visible = false questionDrawer.visible = false
goToPage(PageEnum.PageDeinstalling) PageController.goToPage(PageEnum.PageDeinstalling)
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) { if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
ConnectionController.closeConnection() ConnectionController.closeConnection()
} }

View file

@ -87,7 +87,7 @@ PageType {
case ProtocolEnum.WireGuard: WireGuardConfigModel.updateModel(ProtocolsModel.getConfig()); break; case ProtocolEnum.WireGuard: WireGuardConfigModel.updateModel(ProtocolsModel.getConfig()); break;
case ProtocolEnum.Ipsec: Ikev2ConfigModel.updateModel(ProtocolsModel.getConfig()); break; case ProtocolEnum.Ipsec: Ikev2ConfigModel.updateModel(ProtocolsModel.getConfig()); break;
} }
goToPage(protocolPage); PageController.goToPage(protocolPage);
} }
MouseArea { MouseArea {
@ -120,7 +120,7 @@ PageType {
questionDrawer.yesButtonFunction = function() { questionDrawer.yesButtonFunction = function() {
questionDrawer.visible = false questionDrawer.visible = false
goToPage(PageEnum.PageDeinstalling) PageController.goToPage(PageEnum.PageDeinstalling)
InstallController.removeCurrentlyProcessedContainer() InstallController.removeCurrentlyProcessedContainer()
} }
questionDrawer.noButtonFunction = function() { questionDrawer.noButtonFunction = function() {

View file

@ -98,7 +98,7 @@ PageType {
clickedFunction: function() { clickedFunction: function() {
ServersModel.currentlyProcessedIndex = index ServersModel.currentlyProcessedIndex = index
goToPage(PageEnum.PageSettingsServerInfo) PageController.goToPage(PageEnum.PageSettingsServerInfo)
} }
} }

View file

@ -17,8 +17,8 @@ PageType {
target: ImportController target: ImportController
function onQrDecodingFinished() { function onQrDecodingFinished() {
closePage() PageController.closePage()
goToPage(PageEnum.PageSetupWizardViewConfig) PageController.goToPage(PageEnum.PageSetupWizardViewConfig)
} }
} }
@ -84,7 +84,7 @@ It's okay as long as it's from someone you trust.")
PageController.showBusyIndicator(false) PageController.showBusyIndicator(false)
} else { } else {
ImportController.extractConfigFromFile(fileDialog.selectedFile.toString()) ImportController.extractConfigFromFile(fileDialog.selectedFile.toString())
goToPage(PageEnum.PageSetupWizardViewConfig) PageController.goToPage(PageEnum.PageSetupWizardViewConfig)
} }
} }
} }
@ -103,7 +103,7 @@ It's okay as long as it's from someone you trust.")
clickedFunction: function() { clickedFunction: function() {
ImportController.startDecodingQr() ImportController.startDecodingQr()
if (Qt.platform.os === "ios") { if (Qt.platform.os === "ios") {
goToPage(PageEnum.PageSetupWizardQrReader) PageController.goToPage(PageEnum.PageSetupWizardQrReader)
} }
} }
} }
@ -120,7 +120,7 @@ It's okay as long as it's from someone you trust.")
leftImageSource: "qrc:/images/controls/text-cursor.svg" leftImageSource: "qrc:/images/controls/text-cursor.svg"
clickedFunction: function() { clickedFunction: function() {
goToPage(PageEnum.PageSetupWizardTextKey) PageController.goToPage(PageEnum.PageSetupWizardTextKey)
} }
} }

View file

@ -104,7 +104,7 @@ PageType {
return return
} }
goToPage(PageEnum.PageSetupWizardEasy) PageController.goToPage(PageEnum.PageSetupWizardEasy)
} }
} }
} }

View file

@ -159,12 +159,12 @@ PageType {
onClicked: function() { onClicked: function() {
if (root.isEasySetup) { if (root.isEasySetup) {
ContainersModel.setCurrentlyProcessedContainerIndex(containers.dockerContainer) ContainersModel.setCurrentlyProcessedContainerIndex(containers.dockerContainer)
goToPage(PageEnum.PageSetupWizardInstalling) PageController.goToPage(PageEnum.PageSetupWizardInstalling)
InstallController.install(containers.dockerContainer, InstallController.install(containers.dockerContainer,
containers.containerDefaultPort, containers.containerDefaultPort,
containers.containerDefaultTransportProto) containers.containerDefaultTransportProto)
} else { } else {
goToPage(PageEnum.PageSetupWizardProtocols) PageController.goToPage(PageEnum.PageSetupWizardProtocols)
} }
} }
} }
@ -186,7 +186,7 @@ PageType {
text: qsTr("Set up later") text: qsTr("Set up later")
onClicked: function() { onClicked: function() {
goToPage(PageEnum.PageSetupWizardInstalling) PageController.goToPage(PageEnum.PageSetupWizardInstalling)
InstallController.addEmptyServer() InstallController.addEmptyServer()
} }
} }

View file

@ -24,28 +24,28 @@ PageType {
target: InstallController target: InstallController
function onInstallContainerFinished(finishedMessage, isServiceInstall) { function onInstallContainerFinished(finishedMessage, isServiceInstall) {
goToStartPage() PageController.goToStartPage()
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) { if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) {
PageController.restorePageHomeState(true) PageController.restorePageHomeState(true)
} else if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSettings)) { } else if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSettings)) {
goToPage(PageEnum.PageSettingsServersList, false) PageController.goToPage(PageEnum.PageSettingsServersList, false)
goToPage(PageEnum.PageSettingsServerInfo, false) PageController.goToPage(PageEnum.PageSettingsServerInfo, false)
if (isServiceInstall) { if (isServiceInstall) {
PageController.goToPageSettingsServerServices() PageController.goToPageSettingsServerServices()
} }
} else { } else {
goToPage(PageEnum.PageHome) PageController.goToPage(PageEnum.PageHome)
} }
PageController.showNotificationMessage(finishedMessage) PageController.showNotificationMessage(finishedMessage)
} }
function onInstallServerFinished(finishedMessage) { function onInstallServerFinished(finishedMessage) {
goToStartPage() PageController.goToStartPage()
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) { if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) {
PageController.restorePageHomeState() PageController.restorePageHomeState()
} else if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSettings)) { } else if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSettings)) {
goToPage(PageEnum.PageSettingsServersList, false) PageController.goToPage(PageEnum.PageSettingsServersList, false)
} else { } else {
PageController.replaceStartPage() PageController.replaceStartPage()
} }
@ -54,9 +54,9 @@ PageType {
} }
function onServerAlreadyExists(serverIndex) { function onServerAlreadyExists(serverIndex) {
goToStartPage() PageController.goToStartPage()
ServersModel.currentlyProcessedIndex = serverIndex ServersModel.currentlyProcessedIndex = serverIndex
goToPage(PageEnum.PageSettingsServerInfo, false) PageController.goToPage(PageEnum.PageSettingsServerInfo, false)
PageController.showErrorMessage(qsTr("The server has already been added to the application")) PageController.showErrorMessage(qsTr("The server has already been added to the application"))
} }

View file

@ -229,7 +229,7 @@ PageType {
text: qsTr("Install") text: qsTr("Install")
onClicked: function() { onClicked: function() {
goToPage(PageEnum.PageSetupWizardInstalling); PageController.goToPage(PageEnum.PageSetupWizardInstalling);
InstallController.install(dockerContainer, port.textFieldText, transportProtoSelector.currentIndex) InstallController.install(dockerContainer, port.textFieldText, transportProtoSelector.currentIndex)
} }
} }

View file

@ -105,7 +105,7 @@ PageType {
clickedFunction: function() { clickedFunction: function() {
ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index)) ContainersModel.setCurrentlyProcessedContainerIndex(proxyContainersModel.mapToSource(index))
goToPage(PageEnum.PageSetupWizardProtocolSettings) PageController.goToPage(PageEnum.PageSetupWizardProtocolSettings)
} }
} }

View file

@ -17,7 +17,7 @@ PageType {
target: PageController target: PageController
function onGoToPageViewConfig() { function onGoToPageViewConfig() {
goToPage(PageEnum.PageSetupWizardViewConfig) PageController.goToPage(PageEnum.PageSetupWizardViewConfig)
} }
function onShowBusyIndicator(visible) { function onShowBusyIndicator(visible) {

View file

@ -72,7 +72,7 @@ PageType {
onClicked: function() { onClicked: function() {
ImportController.extractConfigFromCode(textKey.textFieldText) ImportController.extractConfigFromCode(textKey.textFieldText)
goToPage(PageEnum.PageSetupWizardViewConfig) PageController.goToPage(PageEnum.PageSetupWizardViewConfig)
} }
} }
} }

View file

@ -19,16 +19,16 @@ PageType {
target: ImportController target: ImportController
function onImportErrorOccurred(errorMessage) { function onImportErrorOccurred(errorMessage) {
closePage() PageController.closePage()
PageController.showErrorMessage(errorMessage) PageController.showErrorMessage(errorMessage)
} }
function onImportFinished() { function onImportFinished() {
goToStartPage() PageController.goToStartPage()
if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) { if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageHome)) {
PageController.restorePageHomeState() PageController.restorePageHomeState()
} else if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSettings)) { } else if (stackView.currentItem.objectName === PageController.getPagePath(PageEnum.PageSettings)) {
goToPage(PageEnum.PageSettingsServersList, false) PageController.goToPage(PageEnum.PageSettingsServersList, false)
} else { } else {
PageController.replaceStartPage() PageController.replaceStartPage()
} }

View file

@ -47,6 +47,21 @@ PageType {
} }
tabBarStackView.pop() tabBarStackView.pop()
} }
function onGoToPage(page, slide) {
var pagePath = PageController.getPagePath(page)
if (slide) {
tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.PushTransition)
} else {
tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.Immediate)
}
}
function onGoToStartPage() {
while (tabBarStackView.depth > 1) {
tabBarStackView.pop()
}
}
} }
Connections { Connections {