From d349e5014fc60a8ae140a56c457c3f3258959582 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Mon, 21 Oct 2024 09:57:10 -0300 Subject: Adding something Add reviewer data --- kodereviewer/qml/PullRequestDescription.qml | 45 +++++++++++++++++------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'kodereviewer/qml/PullRequestDescription.qml') diff --git a/kodereviewer/qml/PullRequestDescription.qml b/kodereviewer/qml/PullRequestDescription.qml index 075b210..329d288 100644 --- a/kodereviewer/qml/PullRequestDescription.qml +++ b/kodereviewer/qml/PullRequestDescription.qml @@ -5,6 +5,7 @@ import QtQuick.Controls as QQC2 import QtQuick.Layouts import org.deprecated.kodereviewer 1.0 import org.kde.kirigami as Kirigami +import org.kde.kirigamiaddons.delegates as Delegates import org.kde.kirigamiaddons.formcard as FormCard Kirigami.FormLayout { @@ -85,22 +86,6 @@ Kirigami.FormLayout { } } - - ColumnLayout { - Layout.fillWidth: false - Layout.fillHeight: true - - Repeater { - model: 0 - - delegate: QQC2.Label { - text: "#Faa" - } - - } - - } - } Loader { @@ -135,11 +120,35 @@ Kirigami.FormLayout { text: name color: textColor } - } - } + } + Kirigami.Separator { + Kirigami.FormData.isSection: true + Kirigami.FormData.label: "Reviewers" + } + + Loader { + id: reviewerModelLoader + active: !!root.pullRequest + sourceComponent: ReviewerModel { + pullRequest: root.pullRequest + } + } + Column { + Repeater { + id: reviewersListView + model: reviewerModelLoader.item + delegate: QQC2.Label { + required property string username + text: `@${username}` + } + } + } + QQC2.Label { + visible: reviewersListView.count == 0 + text: "No reviewers" } Kirigami.Separator { -- cgit v1.2.3-70-g09d2