Adapt changes from share details page changes
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 9 Dec 2022 12:42:29 +0000 (13:42 +0100)
committerClaudio Cambra <claudio.cambra@gmail.com>
Fri, 9 Dec 2022 14:06:35 +0000 (15:06 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/filedetails/FileDetailsPage.qml
src/gui/filedetails/FileDetailsView.qml
src/gui/filedetails/ShareDelegate.qml
src/gui/filedetails/ShareDetailsPage.qml
src/gui/filedetails/ShareView.qml
src/gui/tray/Window.qml

index 3147bbd6482869caaa7d0db3800bd7c0c2dd6e79..ead5cd075c0c19026c52a67bb8b4a123b2151d60 100644 (file)
@@ -37,6 +37,7 @@ Page {
     property int iconSize: 32
     property StackView rootStackView: StackView {}
     property bool showCloseButton: false
+    property bool backgroundsVisible: true
 
     property FileDetails fileDetails: FileDetails {
         id: fileDetails
@@ -64,6 +65,7 @@ Page {
 
     background: Rectangle {
         color: Style.backgroundColor
+        visible: root.backgroundsVisible
     }
 
     header: ColumnLayout {
@@ -210,6 +212,7 @@ Page {
             horizontalPadding: root.intendedPadding
             iconSize: root.iconSize
             rootStackView: root.rootStackView
+            backgroundsVisible: root.backgroundsVisible
         }
     }
 }
index 8c9edbaf5a8171bb90225ec010dba48b58c5ae17..de5fec16e399adcce13d88ac50f974187daddcd2 100644 (file)
@@ -22,14 +22,24 @@ import Style 1.0
 StackView {
     id: root
 
-    property var accountState: ({})
-    property string localPath: ""
+    signal closeButtonClicked
+
+    property alias accountState: fileDetailsPage.accountState
+    property alias localPath: fileDetailsPage.localPath
+    property alias showCloseButton: fileDetailsPage.showCloseButton
+    property bool backgroundsVisible: true
+
+    background: Rectangle {
+        color: Style.backgroundColor
+        visible: root.backgroundsVisible
+    }
 
     initialItem: FileDetailsPage {
+        id: fileDetailsPage
         width: parent.width
         height: parent.height
-        accountState: root.accountState
-        localPath: root.localPath
+        backgroundsVisible: root.backgroundsVisible
         rootStackView: root
+        onCloseButtonClicked: root.closeButtonClicked()
     }
 }
index 2f0f32405683020a8f1b2c38eb2fe1a4cf0e4f9d..5768cc44de34704d3297e90d0c45d8d653c27e5d 100644 (file)
@@ -47,6 +47,7 @@ GridLayout {
     property int iconSize: 32
     property FileDetails fileDetails: FileDetails {}
     property StackView rootStackView: StackView {}
+    property bool backgroundsVisible: true
 
     property bool canCreateLinkShares: true
 
@@ -221,6 +222,7 @@ GridLayout {
 
                     width: parent.width
                     height: parent.height
+                    backgroundsVisible: root.backgroundsVisible
 
                     fileDetails: root.fileDetails
                     shareModelData: model
index 3b52cac308b56ae754710f0b31f741466eb993ff..9c5618fece24ce4eceeb76f1fe4bd4e05e1448b5 100644 (file)
@@ -41,6 +41,8 @@ Page {
     signal setPassword(string password)
     signal setNote(string note)
 
+    property bool backgroundsVisible: true
+
     property FileDetails fileDetails: FileDetails {}
     property var shareModelData: ({})
 
@@ -177,6 +179,7 @@ Page {
 
     background: Rectangle {
         color: Style.backgroundColor
+        visible: root.backgroundsVisible
     }
 
     header: ColumnLayout {
index 8bc90ba66ad831a037168e2643ef3c6068a603a6..e2cb0d658d912ceffce939327f7c4c8d1816c99a 100644 (file)
@@ -30,6 +30,7 @@ ColumnLayout {
     property FileDetails fileDetails: FileDetails {}
     property int horizontalPadding: 0
     property int iconSize: 32
+    property bool backgroundsVisible: true
 
     readonly property bool sharingPossible: shareModel && shareModel.canShare && shareModel.sharingEnabled
     readonly property bool userGroupSharingPossible: sharingPossible && shareModel.userGroupSharingEnabled
@@ -225,6 +226,7 @@ ColumnLayout {
                     iconSize: root.iconSize
                     fileDetails: root.fileDetails
                     rootStackView: root.rootStackView
+                    backgroundsVisible: root.backgroundsVisible
                     canCreateLinkShares: root.publicLinkSharingPossible
 
                     onCreateNewLinkShare: {
index fdf96a64f5e64da10a8807cbf6033739eedb5ee9..356479f30bbef05d10d16b67d6c84131ab25987d 100644 (file)
@@ -155,6 +155,7 @@ ApplicationWindow {
         edge: Qt.RightEdge\r
         modal: true\r
         visible: false\r
+        clip: true\r
 \r
         background: Rectangle {\r
             radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius\r
@@ -188,13 +189,13 @@ ApplicationWindow {
                                                 fileDetailsDrawer.pageToShow);\r
                 }\r
             }\r
-            sourceComponent: FileDetailsPage {\r
+            sourceComponent: FileDetailsView {\r
                 id: fileDetails\r
 \r
                 width: parent.width\r
                 height: parent.height\r
 \r
-                background: null\r
+                backgroundsVisible: false\r
                 accountState: fileDetailsDrawer.folderAccountState\r
                 localPath: fileDetailsDrawer.fileLocalPath\r
                 showCloseButton: true\r