From 522fdc2402443fd37665e2764d1367f7dad2a5b5 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Mon, 14 Oct 2024 07:12:12 -0300 Subject: Use context drawer in pull request page --- kodereviewer/qml/PullRequestPage.qml | 30 +++++++++++++++++++++++++++--- 1 file 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 -- cgit v1.2.3-70-g09d2