diff options
author | Matias Linares <matias@deprecated.org> | 2024-10-05 10:43:00 -0300 |
---|---|---|
committer | Matias Linares <matias@deprecated.org> | 2024-10-05 10:43:00 -0300 |
commit | 39349a7e1e4fbb16e4a71d7f741b0725e73caeb7 (patch) | |
tree | 72dc36cca5c3feca1afa3594999b5d44b1cf0483 /kodereviewer/qml/PullRequestPage.qml | |
parent | b31efe70f22cd0535dbcb7ef596a365ad44c3dc3 (diff) | |
download | kodereviewer-39349a7e1e4fbb16e4a71d7f741b0725e73caeb7.tar.gz |
Add review changes functionality!
Diffstat (limited to 'kodereviewer/qml/PullRequestPage.qml')
-rw-r--r-- | kodereviewer/qml/PullRequestPage.qml | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/kodereviewer/qml/PullRequestPage.qml b/kodereviewer/qml/PullRequestPage.qml index da2b8e5..b9106c1 100644 --- a/kodereviewer/qml/PullRequestPage.qml +++ b/kodereviewer/qml/PullRequestPage.qml @@ -30,32 +30,18 @@ Kirigami.ScrollablePage { } ] - Kirigami.Dialog { + ReviewDialog { id: reviewChangesDialog - standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel - title: i18nc("@title:window", "Review changes") - padding: Kirigami.Units.largeSpacing - preferredWidth: Kirigami.Units.gridUnit * 20 - ColumnLayout { - MarkdownTextArea { - Layout.fillWidth: true - } - Kirigami.Separator { - Kirigami.FormData.isSection: true - Layout.fillWidth: true - } - QQC2.RadioButton { - text: "Approve" - } - QQC2.RadioButton { - text: "Comment" - } - QQC2.RadioButton { - text: "Request changes" - } + onAccepted: { + print('Sending', root.pullRequest.number, root.pullRequest.last_commit, + reviewBodyText, event) + root.connection.createReview( + root.pullRequest.number, root.pullRequest.last_commit, + reviewBodyText, event + ) + clearForm() } } - Loader { id: commentModelLoader active: !!root.pullRequest @@ -136,6 +122,17 @@ Kirigami.ScrollablePage { } } + RowLayout { + QQC2.Label { + text: "Last commit: " + elide: Text.ElideRight + } + QQC2.Label { + text: root.pullRequest ? root.pullRequest.last_commit : "" + elide: Text.ElideLeft + } + } + Loader { id: labelModelLoader active: !!root.pullRequest |