summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatias Linares <matias@deprecated.org>2024-10-14 07:12:12 -0300
committerMatias Linares <matias@deprecated.org>2024-10-14 07:12:12 -0300
commit522fdc2402443fd37665e2764d1367f7dad2a5b5 (patch)
tree142d8a7d8176dea2bdf7cdf853fad86d95a511b2
parent9157444f4e0bc50e16e6bd13c3e7284104e1d2e8 (diff)
downloadkodereviewer-522fdc2402443fd37665e2764d1367f7dad2a5b5.tar.gz
Use context drawer in pull request pagecontext-drawer
-rw-r--r--kodereviewer/qml/PullRequestPage.qml30
1 files changed, 27 insertions, 3 deletions
diff --git a/kodereviewer/qml/PullRequestPage.qml b/kodereviewer/qml/PullRequestPage.qml
index 58e044d..860bfcb 100644
--- a/kodereviewer/qml/PullRequestPage.qml
+++ b/kodereviewer/qml/PullRequestPage.qml
@@ -27,6 +27,15 @@ Kirigami.ScrollablePage {
icon.name: "preview-symbolic"
enabled: !!root.pullRequest
onTriggered: reviewChangesDialog.open()
+ },
+ Kirigami.Action {
+ id: openFiles
+ text: "Files"
+ icon.name: "file-catalog-symbolic"
+ enabled: !!root.pullRequest
+ onTriggered: {
+ contextDrawer.open()
+ }
}
]
@@ -63,6 +72,21 @@ Kirigami.ScrollablePage {
}
}
+ Loader {
+ id: treeFileModelLoader
+ active: !!root.pullRequest
+ sourceComponent: TreeFileModel {
+ pullRequest: root.pullRequest
+ }
+ }
+
+ KRContextDrawer {
+ id: contextDrawer
+ enabled: !!root.pullRequest
+ modal: true
+ model: treeFileModelLoader.item
+ }
+
Kirigami.PlaceholderMessage {
visible: !root.pullRequest
anchors.centerIn: parent
@@ -73,9 +97,9 @@ Kirigami.ScrollablePage {
PullRequestDescription {
visible: !!root.pullRequest && root.currentView == "info"
pullRequest: root.pullRequest
- anchors.centerIn: parent
+ anchors.fill: parent
}
-/*
+
Kirigami.CardsListView {
visible: !!root.pullRequest && root.currentView == "comments"
anchors.fill: parent
@@ -85,7 +109,7 @@ Kirigami.ScrollablePage {
delegate: CommentDelegate {}
footerPositioning: ListView.OverlayFooter
}
-*/
+
FilesView {
visible: !!root.pullRequest && root.currentView == "files"
fileModel: fileModelLoader.item