@seafile/sdoc-editor 0.1.17 → 0.1.18-beta
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.
|
@@ -38,7 +38,7 @@ var HeaderMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
38
38
|
};
|
|
39
39
|
_this.onToggleClick = function (event) {
|
|
40
40
|
event.stopPropagation();
|
|
41
|
-
event.nativeEvent.stopImmediatePropagation;
|
|
41
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
42
42
|
var isShowHeaderPopover = !_this.state.isShowHeaderPopover;
|
|
43
43
|
if (isShowHeaderPopover) {
|
|
44
44
|
_this.setState({
|
|
@@ -4,25 +4,40 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React, { Fragment } from 'react';
|
|
6
6
|
import CollaboratorsOperation from './collaborators-operation';
|
|
7
|
+
import context from '../../context';
|
|
7
8
|
import './style.css';
|
|
8
9
|
var DocOperations = /*#__PURE__*/function (_React$Component) {
|
|
9
10
|
_inherits(DocOperations, _React$Component);
|
|
10
11
|
var _super = _createSuper(DocOperations);
|
|
11
12
|
function DocOperations() {
|
|
13
|
+
var _this;
|
|
12
14
|
_classCallCheck(this, DocOperations);
|
|
13
|
-
|
|
15
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
+
args[_key] = arguments[_key];
|
|
17
|
+
}
|
|
18
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
19
|
+
_this.toggleHistory = function (event) {
|
|
20
|
+
event.stopPropagation();
|
|
21
|
+
event.nativeEvent.stopImmediatePropagation();
|
|
22
|
+
var historyURL = context.getSetting('historyURL');
|
|
23
|
+
window.location.href = historyURL;
|
|
24
|
+
};
|
|
25
|
+
return _this;
|
|
14
26
|
}
|
|
15
27
|
_createClass(DocOperations, [{
|
|
16
28
|
key: "render",
|
|
17
29
|
value: function render() {
|
|
30
|
+
var docPerm = context.getSetting('docPerm');
|
|
31
|
+
var historyURL = context.getSetting('historyURL');
|
|
18
32
|
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
19
33
|
className: "doc-ops"
|
|
20
34
|
}, /*#__PURE__*/React.createElement("span", {
|
|
21
35
|
className: "op-item"
|
|
22
36
|
}, /*#__PURE__*/React.createElement("i", {
|
|
23
37
|
className: "iconfont icon-share"
|
|
24
|
-
})), /*#__PURE__*/React.createElement("span", {
|
|
25
|
-
className: "op-item"
|
|
38
|
+
})), docPerm === 'rw' && historyURL && /*#__PURE__*/React.createElement("span", {
|
|
39
|
+
className: "op-item",
|
|
40
|
+
onClick: this.toggleHistory
|
|
26
41
|
}, /*#__PURE__*/React.createElement("i", {
|
|
27
42
|
className: "iconfont icon-history"
|
|
28
43
|
})), /*#__PURE__*/React.createElement(CollaboratorsOperation, null), /*#__PURE__*/React.createElement("span", {
|