@seafile/sdoc-editor 0.1.146-beta → 0.1.146-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.
|
@@ -123,17 +123,6 @@ var SocketClient = /*#__PURE__*/_createClass(function SocketClient(config) {
|
|
|
123
123
|
var socketManager = SocketManager.getInstance();
|
|
124
124
|
socketManager.receiveRebaseContent(document, originFileVersion);
|
|
125
125
|
};
|
|
126
|
-
this.sendRebaseDocument = function (document, originFileVersion, callback) {
|
|
127
|
-
debug('=========== send operations ==========');
|
|
128
|
-
debug('%O', document);
|
|
129
|
-
debug('======================================');
|
|
130
|
-
_this.socket.emit('rebase-document', _this.getParams({
|
|
131
|
-
document: document,
|
|
132
|
-
originFileVersion: originFileVersion
|
|
133
|
-
}), function (result) {
|
|
134
|
-
callback && callback(result);
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
126
|
this.sendPublishDocument = function (originFileURL, callback) {
|
|
138
127
|
_this.socket.emit('publish-document', _this.getParams({
|
|
139
128
|
originFileURL: originFileURL
|
|
@@ -27,16 +27,10 @@ var SocketManager = /*#__PURE__*/_createClass(function SocketManager(editor, _do
|
|
|
27
27
|
var version = _this.document.version;
|
|
28
28
|
return version;
|
|
29
29
|
};
|
|
30
|
-
this.sendRebaseContent = function (document, originFileVersion) {
|
|
31
|
-
_this.socketClient.sendRebaseDocument(document, originFileVersion, function (result) {
|
|
32
|
-
var serverVersion = result.version;
|
|
33
|
-
_this.document['version'] = serverVersion;
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
30
|
this.sendPublishDocument = function (originFileURL) {
|
|
37
31
|
_this.socketClient.sendPublishDocument(originFileURL);
|
|
38
32
|
};
|
|
39
|
-
this.
|
|
33
|
+
this.receivePublishDocument = function (originFileURL) {
|
|
40
34
|
_this.eventBus.dispatch(EXTERNAL_EVENT.PUBLISH_DOCUMENT, originFileURL);
|
|
41
35
|
};
|
|
42
36
|
this.sendMergeDocument = function (document, originFileVersion) {
|
|
@@ -292,9 +292,11 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
292
292
|
// 通知其他用户文档已经发布
|
|
293
293
|
var targetURL = "".concat(siteRoot, "lib/").concat(repoID, "/file/").concat(originFilePath);
|
|
294
294
|
editorRef.current.publishDocument(targetURL);
|
|
295
|
-
setShowTip(false);
|
|
296
295
|
// 跳转页面
|
|
296
|
+
|
|
297
|
+
console.log(targetURL);
|
|
297
298
|
jumpToURL(targetURL);
|
|
299
|
+
setShowTip(false);
|
|
298
300
|
}
|
|
299
301
|
}).catch(function (error) {
|
|
300
302
|
toaster.danger(t('Error'));
|