rearch
[tlb/tlb-podcasts.git] / tlb / ui / qml / views / Show.qml
1 import QtQuick
2 import QtQuick.Layouts
3
4 import tlb.core
5 import "qrc:/tlb/ui/qml/templates"
6 /* import tlb.ui 1.0 */
7
8 Page {
9 pageTitle: "Show Details"
10
11 /* this should show actual details for a show. sqlite? */
12 content: Item {
13 id: root
14
15 anchors.fill: parent
16
17 Column {
18 anchors {
19 fill: parent
20 margins: 20
21 bottomMargin: 80
22 }
23 clip: true
24
25 /* MVP: show basic stats of the show. */
26 Loader {
27 id: l1
28
29 anchors {
30 left: parent.left
31 right: parent.right
32 }
33
34 active: AppManager.shows.current !== null
35 sourceComponent: /* ColumnLayout { */ Column {
36 spacing: 5
37
38 TextWrapper {
39 text: "Name: " + AppManager.shows.current.title
40
41 Layout.preferredWidth: parent.width
42 width: parent.width
43 }
44 TextWrapper {
45 wrapMode: Text.WordWrap
46 /* the description already has paragraphs, add more for separation */
47 text: "Description: <p>" + AppManager.shows.current.description + "</p>"
48
49 width: parent.width
50 /* these don't work by proxy if we want the word wrap to work */
51 textMaxWidth: parent.width
52 /* Layout.fillWidth: true */
53 Layout.maximumWidth: parent.width
54 Layout.preferredWidth: parent.width
55 Layout.maximumHeight: 1000
56 }
57 TextWrapper {
58 text: "Language: " + AppManager.shows.current.language
59
60 width: parent.width
61 Layout.preferredWidth: parent.width
62 }
63 TextWrapper {
64 text: "Author: " + AppManager.shows.current.author
65
66 width: parent.width
67 Layout.preferredWidth: parent.width
68 }
69 TextWrapper {
70 text: "Episodes: " + AppManager.shows.current.episodeCount
71
72 width: parent.width
73 Layout.preferredWidth: parent.width
74 }
75 }
76 }
77
78 /* Summary of recent episodes */
79
80 }
81
82 Text {
83 text: AppManager.shows.selectedName + " FETCH BY HAND"
84 visible: !l1.active
85 }
86
87 /* near the bottom, put a refresh button that downloads the feed. */
88 Rectangle {
89 width: 40
90 height: 40
91 color: "purple"
92 anchors {
93 bottom: root.bottom
94 left: root.left
95 margins: 30
96 }
97 MouseArea {
98 anchors.fill: parent
99 onClicked: {
100 AppManager.shows.refreshSelected()
101 }
102 }
103 }
104 }
105 }