2021-02-16 17:01:17 +00:00
|
|
|
import QtQuick 2.12
|
2021-03-04 16:26:51 +00:00
|
|
|
import QtQuick.Controls 2.12
|
2021-02-16 17:01:17 +00:00
|
|
|
import QtQuick.Window 2.12
|
|
|
|
|
2021-03-24 19:04:03 +00:00
|
|
|
import nl.netsoj.chris.Jellyfin 1.0 as J
|
2021-03-04 16:26:51 +00:00
|
|
|
|
2021-02-16 17:01:17 +00:00
|
|
|
import "components"
|
2021-03-07 15:26:13 +00:00
|
|
|
import ".."
|
2021-03-24 19:04:03 +00:00
|
|
|
import "."
|
2021-02-16 17:01:17 +00:00
|
|
|
|
2021-03-04 16:26:51 +00:00
|
|
|
ApplicationWindow {
|
2021-03-07 15:26:13 +00:00
|
|
|
id: appWindow
|
2021-02-16 17:01:17 +00:00
|
|
|
width: 600
|
|
|
|
height: 600
|
|
|
|
visible: true
|
2021-03-07 15:26:13 +00:00
|
|
|
property int _oldDepth: 0
|
2021-02-16 17:01:17 +00:00
|
|
|
|
2021-03-04 16:26:51 +00:00
|
|
|
background: Background {
|
2021-03-07 15:26:13 +00:00
|
|
|
id: background
|
2021-03-04 16:26:51 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
|
|
|
|
StackView {
|
|
|
|
id: pageStack
|
2021-02-16 17:01:17 +00:00
|
|
|
anchors.fill: parent
|
2021-03-07 15:26:13 +00:00
|
|
|
onDepthChanged: {
|
|
|
|
if (depth >= _oldDepth) {
|
|
|
|
background.enter();
|
|
|
|
} else {
|
|
|
|
background.exit();
|
|
|
|
}
|
|
|
|
_oldDepth = depth
|
|
|
|
}
|
2021-03-19 19:57:04 +00:00
|
|
|
initialItem: Qt.resolvedUrl("pages/MainPage.qml")
|
|
|
|
Keys.onEscapePressed: pop()
|
2021-02-16 17:01:17 +00:00
|
|
|
}
|
2021-03-04 16:26:51 +00:00
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: ApiClient
|
2021-03-19 19:57:04 +00:00
|
|
|
onSetupRequired: pageStack.replace(Qt.resolvedUrl("pages/setup/ServerSelectPage.qml"));
|
2021-03-04 16:26:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
ApiClient.restoreSavedSession()
|
|
|
|
}
|
2021-02-16 17:01:17 +00:00
|
|
|
}
|