pretty minor case of suffering

This commit is contained in:
Dark Steveneq
2025-10-19 22:35:30 +02:00
parent 629408b02e
commit c168086601
4 changed files with 174 additions and 108 deletions

View File

@@ -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
}
}