forked from ghostfox/qyouradio
pretty minor case of suffering
This commit is contained in:
@@ -7,14 +7,14 @@ import QYRComponents 1.0
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
|
||||
|
||||
property bool loading: true
|
||||
property bool failed: false
|
||||
|
||||
GridView {
|
||||
width: Math.floor(cellWidth / parent.width) * cellWidth
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Player.active ? 96 : 0
|
||||
// anchors.topMargin: Player.active ? 96 : 0
|
||||
visible: !loading || !failed
|
||||
anchors.fill: parent
|
||||
model: ListModel { id: model }
|
||||
@@ -24,6 +24,8 @@ Item {
|
||||
cellHeight: 224
|
||||
|
||||
delegate: VideoEntry {}
|
||||
|
||||
Component.onCompleted: console.log(cellWidth / parent.width)
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
@@ -71,7 +73,7 @@ Item {
|
||||
loading = true;
|
||||
failed = false;
|
||||
const xhr = new XMLHttpRequest;
|
||||
xhr.open("GET", "http://youvideo.nonamesoft.xyz/youvideo/api/videos");
|
||||
xhr.open("GET", "https://youvideo.nonamesoft.xyz/youvideo/api/videos");
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState == XMLHttpRequest.DONE) {
|
||||
loading = false;
|
||||
@@ -94,11 +96,4 @@ Item {
|
||||
}
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
VideoPlayer {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user