mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2024-11-22 17:25:17 +00:00
68 lines
1.4 KiB
QML
68 lines
1.4 KiB
QML
import QtQuick 2.12
|
|
import QtQuick.Controls 2.12
|
|
import QtQuick.Window 2.12
|
|
|
|
import nl.netsoj.chris.Jellyfin 1.0 as J
|
|
|
|
import "components"
|
|
import ".."
|
|
import "."
|
|
|
|
ApplicationWindow {
|
|
id: appWindow
|
|
width: 600
|
|
height: 600
|
|
visible: true
|
|
property int _oldDepth: 0
|
|
property alias playbackManager: playbackManager
|
|
|
|
J.PlaybackManager {
|
|
id: playbackManager
|
|
}
|
|
|
|
background: Background {
|
|
id: background
|
|
anchors.fill: parent
|
|
}
|
|
|
|
StackView {
|
|
id: pageStack
|
|
anchors.fill: parent
|
|
onDepthChanged: {
|
|
if (depth >= _oldDepth) {
|
|
background.enter();
|
|
} else {
|
|
background.exit();
|
|
}
|
|
_oldDepth = depth
|
|
}
|
|
initialItem: Qt.resolvedUrl("pages/MainPage.qml")
|
|
Keys.onEscapePressed: pop()
|
|
}
|
|
|
|
Connections {
|
|
target: ApiClient
|
|
onSetupRequired: { pageStack.replace(Qt.resolvedUrl("pages/setup/ServerSelectPage.qml")); }
|
|
}
|
|
|
|
Component.onCompleted: {
|
|
ApiClient.restoreSavedSession()
|
|
}
|
|
|
|
footer: Column {
|
|
id: footer
|
|
Text {
|
|
text: qsTr("Now playing")
|
|
color: "white"
|
|
}
|
|
Text {
|
|
text: playbackManager.item.name ? playbackManager.item.name : "Nothing"
|
|
color: "white"
|
|
}
|
|
}
|
|
Rectangle {
|
|
color: "darkblue"
|
|
anchors.fill: footer
|
|
}
|
|
}
|