@seafile/seafile-sdoc-editor 3.0.264 → 3.0.267
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.
|
@@ -44,6 +44,8 @@ var TipMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
44
44
|
});
|
|
45
45
|
});
|
|
46
46
|
(0, _defineProperty2["default"])(_this, "onTokenExpiredError", function (msg) {
|
|
47
|
+
if (_this.isTokenExpired) return;
|
|
48
|
+
_this.isTokenExpired = true;
|
|
47
49
|
var t = _this.props.t;
|
|
48
50
|
var message = t('Token_expired_Please_refresh_the_page');
|
|
49
51
|
_sdocEditor.toaster.closeAll();
|
|
@@ -52,6 +54,7 @@ var TipMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
52
54
|
});
|
|
53
55
|
});
|
|
54
56
|
(0, _defineProperty2["default"])(_this, "onPendingOpExceedLimit", function () {
|
|
57
|
+
if (_this.isTokenExpired) return;
|
|
55
58
|
var t = _this.props.t;
|
|
56
59
|
_sdocEditor.toaster.closeAll();
|
|
57
60
|
var message = t('Pending_operations_exceed_limit');
|
|
@@ -60,6 +63,7 @@ var TipMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
60
63
|
});
|
|
61
64
|
});
|
|
62
65
|
(0, _defineProperty2["default"])(_this, "onDisconnect", function () {
|
|
66
|
+
if (_this.isTokenExpired) return;
|
|
63
67
|
var _this$props = _this.props,
|
|
64
68
|
t = _this$props.t,
|
|
65
69
|
isEditMode = _this$props.isEditMode;
|
|
@@ -71,6 +75,7 @@ var TipMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
71
75
|
});
|
|
72
76
|
});
|
|
73
77
|
(0, _defineProperty2["default"])(_this, "onReconnectError", function () {
|
|
78
|
+
if (_this.isTokenExpired) return;
|
|
74
79
|
if (!_this.isConnectError) {
|
|
75
80
|
_this.isConnectError = true;
|
|
76
81
|
var t = _this.props.t;
|
|
@@ -83,10 +88,12 @@ var TipMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
83
88
|
}
|
|
84
89
|
});
|
|
85
90
|
(0, _defineProperty2["default"])(_this, "onConnect", function () {
|
|
91
|
+
if (_this.isTokenExpired) return;
|
|
86
92
|
_this.isConnectError = false;
|
|
87
93
|
_sdocEditor.toaster.closeAll();
|
|
88
94
|
});
|
|
89
95
|
(0, _defineProperty2["default"])(_this, "onReconnect", function () {
|
|
96
|
+
if (_this.isTokenExpired) return;
|
|
90
97
|
_this.isConnectError = false;
|
|
91
98
|
var t = _this.props.t;
|
|
92
99
|
var message = t('Server_is_reconnected');
|
|
@@ -144,6 +151,7 @@ var TipMessage = /*#__PURE__*/function (_React$Component) {
|
|
|
144
151
|
lastSavedAt: ''
|
|
145
152
|
};
|
|
146
153
|
_this.saveTimer = null;
|
|
154
|
+
_this.isTokenExpired = false;
|
|
147
155
|
return _this;
|
|
148
156
|
}
|
|
149
157
|
(0, _inherits2["default"])(TipMessage, _React$Component);
|
package/dist/constants/index.js
CHANGED
|
@@ -23,6 +23,9 @@ var EXTERNAL_EVENT = exports.EXTERNAL_EVENT = {
|
|
|
23
23
|
CREATE_WHITEBOARD_FILE: _sdocEditor.INTERNAL_EVENT.CREATE_WHITEBOARD_FILE,
|
|
24
24
|
GENERATE_EXDRAW_READ_ONLY_LINK: _sdocEditor.INTERNAL_EVENT.GENERATE_EXDRAW_READ_ONLY_LINK,
|
|
25
25
|
FILE_METADATA_COMPONENT: _sdocEditor.INTERNAL_EVENT.FILE_METADATA_COMPONENT,
|
|
26
|
+
IMAGE_PREVIEWER_OPENED: _sdocEditor.INTERNAL_EVENT.IMAGE_PREVIEWER_OPENED,
|
|
27
|
+
IMAGE_PREVIEWER_CLOSED: _sdocEditor.INTERNAL_EVENT.IMAGE_PREVIEWER_CLOSED,
|
|
28
|
+
CLOSE_IMAGE_PREVIEWER: _sdocEditor.INTERNAL_EVENT.CLOSE_IMAGE_PREVIEWER,
|
|
26
29
|
// wiki
|
|
27
30
|
CREATE_SDOC_FILE: _sdocEditor.INTERNAL_EVENT.CREATE_SDOC_FILE,
|
|
28
31
|
CREATE_WIKI_PAGE: _sdocEditor.INTERNAL_EVENT.CREATE_WIKI_PAGE,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/seafile-sdoc-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.267",
|
|
4
4
|
"author": "shuntian <978987373@qq.com>",
|
|
5
5
|
"homepage": "https://github.com/seafileltd/sea-sdoc-editor#readme",
|
|
6
6
|
"license": "ISC",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"description": "",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@seafile/print-js": "1.6.6",
|
|
32
|
-
"@seafile/sdoc-editor": "^3.0.
|
|
32
|
+
"@seafile/sdoc-editor": "^3.0.267",
|
|
33
33
|
"classnames": "2.3.2",
|
|
34
34
|
"dayjs": "1.10.7"
|
|
35
35
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "16229ee45db1b9dd5052ad9fb9c8ae54ab5bd4bf"
|
|
49
49
|
}
|