@seafile/sdoc-editor 0.1.146-beta2 → 0.1.146-beta3
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.
|
@@ -32,7 +32,7 @@ var TipContent = function TipContent(_ref) {
|
|
|
32
32
|
var siteRoot = context.getSetting('siteRoot');
|
|
33
33
|
var originFilePath = context.getSetting('originFilePath');
|
|
34
34
|
var originFileURL = "".concat(siteRoot, "lib/").concat(repoID, "/file").concat(originFilePath);
|
|
35
|
-
window.href = originFileURL;
|
|
35
|
+
window.location.href = originFileURL;
|
|
36
36
|
}
|
|
37
37
|
}, [time]);
|
|
38
38
|
var _useTranslation = useTranslation(),
|
|
@@ -278,7 +278,7 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
278
278
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
279
279
|
}, [isShowChanges]);
|
|
280
280
|
var jumpToURL = useCallback(function (url) {
|
|
281
|
-
window.href = url;
|
|
281
|
+
window.location.href = url;
|
|
282
282
|
}, []);
|
|
283
283
|
var closeTip = useCallback(function () {
|
|
284
284
|
setShowTip(false);
|
|
@@ -290,11 +290,9 @@ var SimpleEditor = function SimpleEditor(_ref) {
|
|
|
290
290
|
context.deleteSdocRevision().then(function (res) {
|
|
291
291
|
if (res.data.success) {
|
|
292
292
|
// 通知其他用户文档已经发布
|
|
293
|
-
var targetURL = "".concat(siteRoot, "lib/").concat(repoID, "/file
|
|
293
|
+
var targetURL = "".concat(siteRoot, "lib/").concat(repoID, "/file").concat(originFilePath);
|
|
294
294
|
editorRef.current.publishDocument(targetURL);
|
|
295
295
|
// 跳转页面
|
|
296
|
-
|
|
297
|
-
console.log(targetURL);
|
|
298
296
|
jumpToURL(targetURL);
|
|
299
297
|
setShowTip(false);
|
|
300
298
|
}
|