Add stackview to file details view
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 18 Nov 2022 15:12:30 +0000 (16:12 +0100)
committerClaudio Cambra <claudio.cambra@gmail.com>
Fri, 9 Dec 2022 11:54:09 +0000 (12:54 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
resources.qrc
src/gui/filedetails/FileDetailsPage.qml
src/gui/filedetails/FileDetailsView.qml [new file with mode: 0644]
src/gui/filedetails/FileDetailsWindow.qml

index 2c6f6a299aea293041403c8df7ae68305ad8562b..f233501fc66676d35e9f64a4898a954161c4730b 100644 (file)
@@ -9,12 +9,14 @@
         <file>src/gui/ErrorBox.qml</file>
         <file>src/gui/filedetails/FileActivityView.qml</file>
         <file>src/gui/filedetails/FileDetailsPage.qml</file>
+        <file>src/gui/filedetails/FileDetailsView.qml</file>
         <file>src/gui/filedetails/FileDetailsWindow.qml</file>
         <file>src/gui/filedetails/NCInputTextEdit.qml</file>
         <file>src/gui/filedetails/NCInputTextField.qml</file>
         <file>src/gui/filedetails/NCTabButton.qml</file>
         <file>src/gui/filedetails/ShareeDelegate.qml</file>
         <file>src/gui/filedetails/ShareDelegate.qml</file>
+        <file>src/gui/filedetails/ShareDetailsPage.qml</file>
         <file>src/gui/filedetails/ShareeSearchField.qml</file>
         <file>src/gui/filedetails/ShareView.qml</file>
         <file>src/gui/tray/Window.qml</file>
index aa3f4f488c6f9c2a5c15006b4bc5ade41afb9d89..304d1cee4982f3ebd69ab7d0dde4fa3b2005d56c 100644 (file)
@@ -24,7 +24,7 @@ Page {
     id: root
 
     property var accountState: ({})
-    property string localPath: ({})
+    property string localPath: ""
 
     // We want the SwipeView to "spill" over the edges of the window to really
     // make it look nice. If we apply page-wide padding, however, the swipe
@@ -33,6 +33,7 @@ Page {
     // padding, which we have to apply selectively to achieve our desired effect.
     property int intendedPadding: Style.standardSpacing * 2
     property int iconSize: 32
+    property StackView rootStackView: StackView {}
 
     property FileDetails fileDetails: FileDetails {
         id: fileDetails
diff --git a/src/gui/filedetails/FileDetailsView.qml b/src/gui/filedetails/FileDetailsView.qml
new file mode 100644 (file)
index 0000000..0f96d0f
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2022 by Claudio Cambra <claudio.cambra@nextcloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+import QtQuick 2.15
+import QtQuick.Layouts 1.15
+import QtQuick.Controls 2.15
+
+import com.nextcloud.desktopclient 1.0
+import Style 1.0
+
+StackView {
+    id: root
+
+    property var accountState: ({})
+    property string localPath: ""
+
+    FileDetailsPage {
+        width: parent.width
+        height: parent.height
+        accountState: root.accountState
+        localPath: root.localPath
+        rootStackView: root
+    }
+}
index 04320615c54976c6440a721b450743e2b346f281..39c9590e26b31738e57777fc6b7485615988e7f4 100644 (file)
@@ -33,7 +33,7 @@ ApplicationWindow {
 
     title: qsTr("File details of %1 ยท %2").arg(fileDetailsPage.fileDetails.name).arg(Systray.windowTitle)
 
-    FileDetailsPage {
+    FileDetailsView {
         id: fileDetailsPage
         anchors.fill: parent
         accountState: root.accountState