@seafile/sdoc-editor 0.1.69-beta → 0.1.69-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api/seafile-api.js
CHANGED
|
@@ -54,11 +54,12 @@ var SeafileAPI = /*#__PURE__*/function () {
|
|
|
54
54
|
}
|
|
55
55
|
}, {
|
|
56
56
|
key: "startRevise",
|
|
57
|
-
value: function startRevise(repoID, path) {
|
|
57
|
+
value: function startRevise(repoID, fileUuid, path) {
|
|
58
58
|
var url = '/api/v2.1/seadoc/revisions/';
|
|
59
59
|
var form = new FormData();
|
|
60
60
|
form.append('p', path);
|
|
61
61
|
form.append('repo_id', repoID);
|
|
62
|
+
form.append('file_uuid', fileUuid);
|
|
62
63
|
return this._sendPostRequest(url, form);
|
|
63
64
|
}
|
|
64
65
|
}]);
|
|
@@ -39,13 +39,17 @@ var RevisionOperations = function RevisionOperations(_ref) {
|
|
|
39
39
|
|
|
40
40
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
41
|
}, []);
|
|
42
|
-
var startReviseBtn =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
var startReviseBtn = useCallback(function (className) {
|
|
43
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
44
|
+
color: "success",
|
|
45
|
+
className: className,
|
|
46
|
+
onClick: startRevise
|
|
47
|
+
}, t('Start_revise'));
|
|
48
|
+
|
|
49
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
50
|
+
}, []);
|
|
51
|
+
if (!isSdocRevision) return startReviseBtn();
|
|
52
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, startReviseBtn('mr-4'), !isPublished && revisionURL && /*#__PURE__*/React.createElement(Button, {
|
|
49
53
|
color: "success",
|
|
50
54
|
className: "mr-4",
|
|
51
55
|
onClick: viewChanges
|
package/dist/context.js
CHANGED
|
@@ -130,7 +130,8 @@ var Context = /*#__PURE__*/function () {
|
|
|
130
130
|
value: function startRevise() {
|
|
131
131
|
var repoID = this.getSetting('repoID');
|
|
132
132
|
var filePath = this.getSetting('docPath');
|
|
133
|
-
|
|
133
|
+
var fileUuid = this.getSetting('docUuid');
|
|
134
|
+
return this.api.startRevise(repoID, fileUuid, filePath);
|
|
134
135
|
}
|
|
135
136
|
}, {
|
|
136
137
|
key: "publishSdocRevision",
|
package/package.json
CHANGED