@seafile/seafile-sdoc-editor 3.0.265 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-sdoc-editor",
3
- "version": "3.0.265",
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.265",
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": "a2a49ce2e6bad553fa6aa637cb9ce5ec446a6248"
48
+ "gitHead": "16229ee45db1b9dd5052ad9fb9c8ae54ab5bd4bf"
49
49
  }