]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
More distinctly name server allowing resharing property
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 10 Aug 2023 23:33:49 +0000 (07:33 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 11 Aug 2023 14:59:59 +0000 (22:59 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/filedetails/ShareDelegate.qml
src/gui/filedetails/ShareDetailsPage.qml
src/gui/filedetails/ShareView.qml
src/gui/filedetails/sharemodel.cpp
src/gui/filedetails/sharemodel.h

index 26a4db2069bf9afc4f7b5b2b21bc865e92a86591..0974c92d5c10cf978860698551394e76157e5fe8 100644 (file)
@@ -52,7 +52,7 @@ GridLayout {
     property bool backgroundsVisible: true
 
     property bool canCreateLinkShares: true
-    property bool canReshare: true
+    property bool serverAllowsResharing: true
 
     readonly property bool isLinkShare: model.shareType === ShareModel.ShareTypeLink
     readonly property bool isPlaceholderLinkShare: model.shareType === ShareModel.ShareTypePlaceholderLink
@@ -269,7 +269,7 @@ GridLayout {
                     shareModelData: model
 
                     canCreateLinkShares: root.canCreateLinkShares
-                    canReshare: root.canReshare
+                    serverAllowsResharing: root.serverAllowsResharing
 
                     onCloseShareDetails: root.rootStackView.pop(root.rootStackView.initialItem, StackView.PopTransition)
 
index 3d908a17c8b6f0cbe8ff55fb649d7e62de71d27e..41bc8deb9f1b683c037c760da6c76baa4d759b33 100644 (file)
@@ -49,7 +49,7 @@ Page {
     property var shareModelData: ({})
 
     property bool canCreateLinkShares: true
-    property bool canReshare: true
+    property bool serverAllowsResharing: true
 
     readonly property var share: shareModelData.share ?? ({})
 
@@ -448,8 +448,8 @@ Page {
                         checkable: true
                         checked: root.resharingAllowed
                         text: qsTr("Allow resharing")
-                        enabled: !root.isSharePermissionChangeInProgress && root.canReshare
-                        visible: root.canReshare
+                        enabled: !root.isSharePermissionChangeInProgress && root.serverAllowsResharing
+                        visible: root.serverAllowsResharing
                         onClicked: root.toggleAllowResharing(checked);
 
                         Connections {
index 5b9ce77b6ac33e8350b573f6d85cc642e258f1ea..3a89dc4eb092d7e98b426a825fec667ddd7c0e40 100644 (file)
@@ -35,7 +35,7 @@ ColumnLayout {
     readonly property bool sharingPossible: shareModel && shareModel.canShare && shareModel.sharingEnabled
     readonly property bool userGroupSharingPossible: sharingPossible && shareModel.userGroupSharingEnabled
     readonly property bool publicLinkSharingPossible: sharingPossible && shareModel.publicLinkSharesEnabled
-    readonly property bool resharingAllowed: shareModel && shareModel.resharingAllowed
+    readonly property bool serverAllowsResharing: shareModel && shareModel.serverAllowsResharing
 
     readonly property bool loading: sharingPossible && (!shareModel ||
                                                         shareModel.fetchOngoing ||
@@ -215,7 +215,7 @@ ColumnLayout {
                     rootStackView: root.rootStackView
                     backgroundsVisible: root.backgroundsVisible
                     canCreateLinkShares: root.publicLinkSharingPossible
-                    canReshare: root.resharingAllowed
+                    serverAllowsResharing: root.serverAllowsResharing
 
                     onCreateNewLinkShare: {
                         root.waitingForSharesToChange = true;
index 3205b704191d8ca5b499549a718ec3cad7918245..9b748fa739344083e819df273fa034ef59a159b4 100644 (file)
@@ -1251,7 +1251,7 @@ void ShareModel::setAccountState(AccountState *accountState)
     Q_EMIT sharingEnabledChanged();
     Q_EMIT publicLinkSharesEnabledChanged();
     Q_EMIT userGroupSharingEnabledChanged();
-    Q_EMIT resharingAllowedChanged();
+    Q_EMIT serverAllowsResharingChanged();
     updateData();
 }
 
@@ -1311,7 +1311,7 @@ bool ShareModel::canShare() const
     return _maxSharingPermissions & SharePermissionShare;
 }
 
-bool ShareModel::resharingAllowed() const
+bool ShareModel::serverAllowsResharing() const
 {
     return _accountState && _accountState->account() && _accountState->account()->capabilities().isValid()
         && _accountState->account()->capabilities().shareResharing();
index b38499d278b4b5c11c1ebf29fde74d3c6bd56b7d..896c9029e87cf7a215e039cfda1cd1dbaab06475 100644 (file)
@@ -35,7 +35,7 @@ class ShareModel : public QAbstractListModel
     Q_PROPERTY(bool canShare READ canShare NOTIFY sharePermissionsChanged)
     Q_PROPERTY(bool fetchOngoing READ fetchOngoing NOTIFY fetchOngoingChanged)
     Q_PROPERTY(bool hasInitialShareFetchCompleted READ hasInitialShareFetchCompleted NOTIFY hasInitialShareFetchCompletedChanged)
-    Q_PROPERTY(bool resharingAllowed READ resharingAllowed NOTIFY resharingAllowedChanged)
+    Q_PROPERTY(bool serverAllowsResharing READ serverAllowsResharing NOTIFY serverAllowsResharingChanged)
     Q_PROPERTY(QVariantList sharees READ sharees NOTIFY shareesChanged)
 
 public:
@@ -117,7 +117,7 @@ public:
     [[nodiscard]] bool publicLinkSharesEnabled() const;
     [[nodiscard]] bool userGroupSharingEnabled() const;
     [[nodiscard]] bool canShare() const;
-    [[nodiscard]] bool resharingAllowed() const;
+    [[nodiscard]] bool serverAllowsResharing() const;
 
     [[nodiscard]] bool fetchOngoing() const;
     [[nodiscard]] bool hasInitialShareFetchCompleted() const;
@@ -137,7 +137,7 @@ signals:
     void hasInitialShareFetchCompletedChanged();
     void shareesChanged();
     void internalLinkReady();
-    void resharingAllowedChanged();
+    void serverAllowsResharingChanged();
 
     void serverError(const int code, const QString &message);
     void passwordSetError(const QString &shareId, const int code, const QString &message);