import QtQuick 2.0 import Sailfish.Silica 1.0 // Avvio: verifica lo stato dell'autenticazione (cookie persistito) e // indirizza verso la lista sessioni o il login. Page { id: page Column { anchors.centerIn: parent spacing: Theme.paddingLarge width: parent.width - 2 * Theme.horizontalPageMargin Label { anchors.horizontalCenter: parent.horizontalCenter text: "Hermes" font.pixelSize: Theme.fontSizeHuge color: Theme.highlightColor } BusyIndicator { anchors.horizontalCenter: parent.horizontalCenter size: BusyIndicatorSize.Large running: true } } Connections { target: api onAuthChecked: page.route(loggedIn) } Component.onCompleted: api.checkAuth() function route(loggedIn) { if (loggedIn) pageStack.replace(Qt.resolvedUrl("SessionsPage.qml")) else pageStack.replace(Qt.resolvedUrl("LoginPage.qml")) } }