Skip to content

Commit

Permalink
Adapt changes from share details page changes
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra committed Dec 9, 2022
1 parent 373a001 commit 5930fb4
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/gui/filedetails/FileDetailsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -64,6 +65,7 @@ Page {

background: Rectangle {
color: Style.backgroundColor
visible: root.backgroundsVisible
}

header: ColumnLayout {
Expand Down Expand Up @@ -210,6 +212,7 @@ Page {
horizontalPadding: root.intendedPadding
iconSize: root.iconSize
rootStackView: root.rootStackView
backgroundsVisible: root.backgroundsVisible
}
}
}
18 changes: 14 additions & 4 deletions src/gui/filedetails/FileDetailsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
2 changes: 2 additions & 0 deletions src/gui/filedetails/ShareDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -221,6 +222,7 @@ GridLayout {

width: parent.width
height: parent.height
backgroundsVisible: root.backgroundsVisible

fileDetails: root.fileDetails
shareModelData: model
Expand Down
3 changes: 3 additions & 0 deletions src/gui/filedetails/ShareDetailsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Page {
signal setPassword(string password)
signal setNote(string note)

property bool backgroundsVisible: true

property FileDetails fileDetails: FileDetails {}
property var shareModelData: ({})

Expand Down Expand Up @@ -177,6 +179,7 @@ Page {

background: Rectangle {
color: Style.backgroundColor
visible: root.backgroundsVisible
}

header: ColumnLayout {
Expand Down
2 changes: 2 additions & 0 deletions src/gui/filedetails/ShareView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -225,6 +226,7 @@ ColumnLayout {
iconSize: root.iconSize
fileDetails: root.fileDetails
rootStackView: root.rootStackView
backgroundsVisible: root.backgroundsVisible
canCreateLinkShares: root.publicLinkSharingPossible

onCreateNewLinkShare: {
Expand Down
5 changes: 3 additions & 2 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ ApplicationWindow {
edge: Qt.RightEdge
modal: true
visible: false
clip: true

background: Rectangle {
radius: Systray.useNormalWindow ? 0.0 : Style.trayWindowRadius
Expand Down Expand Up @@ -188,13 +189,13 @@ ApplicationWindow {
fileDetailsDrawer.pageToShow);
}
}
sourceComponent: FileDetailsPage {
sourceComponent: FileDetailsView {
id: fileDetails

width: parent.width
height: parent.height

background: null
backgroundsVisible: false
accountState: fileDetailsDrawer.folderAccountState
localPath: fileDetailsDrawer.fileLocalPath
showCloseButton: true
Expand Down

0 comments on commit 5930fb4

Please sign in to comment.