diff options
-rw-r--r-- | kodereviewer/qml/PullRequestPage.qml | 30 |
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 |