@seafile/seafile-editor 0.3.87 → 0.3.90
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.
- package/dist/components/comment-panel.js +2 -2
- package/dist/components/detail-list-view.js +14 -8
- package/dist/components/toolbar.js +0 -0
- package/dist/components/topbar-component/file-info.js +2 -2
- package/dist/css/keyboard-shortcuts.css +0 -1
- package/dist/css/richeditor/navbar-imgbutton.css +0 -0
- package/dist/editor/controller/shortcut-controller.js +13 -0
- package/dist/editor/editor-utils/common-editor-utils.js +0 -0
- package/package.json +2 -2
- package/public/locales/en/seafile-editor.json +0 -0
- package/public/locales/zh-CN/seafile-editor.json +0 -0
- package/public/media/seafile-editor-font/iconfont.eot +0 -0
- package/public/media/seafile-editor-font/iconfont.svg +0 -0
- package/public/media/seafile-editor-font/iconfont.ttf +0 -0
- package/public/media/seafile-editor-font/iconfont.woff +0 -0
- package/public/media/seafile-editor-font/iconfont.woff2 +0 -0
- package/public/media/seafile-editor-font.css +0 -0
|
@@ -4,7 +4,7 @@ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitial
|
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
5
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
8
|
import { processor } from '../utils/seafile-markdown2html';
|
|
9
9
|
import { Button, Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
|
|
10
10
|
import ParticipantsList from './participants-list';
|
|
@@ -202,7 +202,7 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
|
|
|
202
202
|
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
203
203
|
var arr = arguments.length > 2 ? arguments[2] : undefined;
|
|
204
204
|
var oldTime = new Date(item.created_at).getTime();
|
|
205
|
-
var time =
|
|
205
|
+
var time = dayjs(oldTime).format('YYYY-MM-DD HH:mm');
|
|
206
206
|
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
207
207
|
key: item.id
|
|
208
208
|
}, /*#__PURE__*/React.createElement(CommentItem, {
|
|
@@ -3,25 +3,26 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import
|
|
6
|
+
import dayjs from 'dayjs/';
|
|
7
|
+
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
7
8
|
import ParticipantsList from './participants-list';
|
|
8
9
|
import '../css/richeditor/detail-list-view.css';
|
|
9
10
|
|
|
11
|
+
require('dayjs/locale/zh-cn');
|
|
12
|
+
|
|
13
|
+
require('dayjs/locale/en-gb');
|
|
14
|
+
|
|
10
15
|
var DetailListView = /*#__PURE__*/function (_React$Component) {
|
|
11
16
|
_inherits(DetailListView, _React$Component);
|
|
12
17
|
|
|
13
18
|
var _super = _createSuper(DetailListView);
|
|
14
19
|
|
|
15
|
-
function DetailListView() {
|
|
20
|
+
function DetailListView(props) {
|
|
16
21
|
var _this;
|
|
17
22
|
|
|
18
23
|
_classCallCheck(this, DetailListView);
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
args[_key] = arguments[_key];
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
25
|
+
_this = _super.call(this, props);
|
|
25
26
|
|
|
26
27
|
_this.onEditFileTagToggle = function () {
|
|
27
28
|
_this.props.openDialogs && _this.props.openDialogs('file_tags');
|
|
@@ -48,6 +49,11 @@ var DetailListView = /*#__PURE__*/function (_React$Component) {
|
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
|
|
52
|
+
dayjs.extend(relativeTime);
|
|
53
|
+
var app = window.app || {
|
|
54
|
+
config: ''
|
|
55
|
+
};
|
|
56
|
+
dayjs.locale(app.config.lang || 'en');
|
|
51
57
|
return _this;
|
|
52
58
|
}
|
|
53
59
|
|
|
@@ -69,7 +75,7 @@ var DetailListView = /*#__PURE__*/function (_React$Component) {
|
|
|
69
75
|
width: "40%"
|
|
70
76
|
}), /*#__PURE__*/React.createElement("th", {
|
|
71
77
|
width: "60%"
|
|
72
|
-
}))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, this.props.t('Size')), /*#__PURE__*/React.createElement("td", null, this.bytesToSize(fileInfo.size))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, this.props.t('Location')), /*#__PURE__*/React.createElement("td", null, filePath)), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, this.props.t('Last_Update')), /*#__PURE__*/React.createElement("td", null,
|
|
78
|
+
}))), /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, this.props.t('Size')), /*#__PURE__*/React.createElement("td", null, this.bytesToSize(fileInfo.size))), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, this.props.t('Location')), /*#__PURE__*/React.createElement("td", null, filePath)), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", null, this.props.t('Last_Update')), /*#__PURE__*/React.createElement("td", null, dayjs(fileInfo.mtime * 1000).fromNow())), /*#__PURE__*/React.createElement("tr", {
|
|
73
79
|
className: "file-tag-container"
|
|
74
80
|
}, /*#__PURE__*/React.createElement("th", null, this.props.t('Tags')), /*#__PURE__*/React.createElement("td", null, fileTagList.length > 0 && /*#__PURE__*/React.createElement("ul", {
|
|
75
81
|
className: "file-tag-list"
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { withTranslation } from 'react-i18next';
|
|
7
|
-
import
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
8
|
import InternalLinkDialog from '../internal-link-dialog';
|
|
9
9
|
|
|
10
10
|
var FileInfo = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -23,7 +23,7 @@ var FileInfo = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
23
23
|
value: function render() {
|
|
24
24
|
var lockedText = this.props.t('locked');
|
|
25
25
|
var fileInfo = this.props.fileInfo;
|
|
26
|
-
var modifyTime =
|
|
26
|
+
var modifyTime = dayjs(fileInfo.mtime * 1000).format('YYYY-MM-DD HH:mm');
|
|
27
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
28
|
className: 'file-info-wrapper'
|
|
29
29
|
}, /*#__PURE__*/React.createElement("div", {
|
|
File without changes
|
|
@@ -403,6 +403,19 @@ var withMarkdownShortcut = function withMarkdownShortcut(editor) {
|
|
|
403
403
|
exec(command);
|
|
404
404
|
break;
|
|
405
405
|
|
|
406
|
+
case 'delete_fragment':
|
|
407
|
+
var _Range$edges = Range.edges(editor.selection),
|
|
408
|
+
_Range$edges2 = _slicedToArray(_Range$edges, 2),
|
|
409
|
+
end = _Range$edges2[1];
|
|
410
|
+
|
|
411
|
+
var voids = Editor.match(editor, end.path, 'void');
|
|
412
|
+
var endVoid = voids ? voids : null; // do not unhange selection when end point is a void node when delete fragment,
|
|
413
|
+
|
|
414
|
+
Editor.delete(editor, {
|
|
415
|
+
hanging: endVoid ? true : false
|
|
416
|
+
});
|
|
417
|
+
return;
|
|
418
|
+
|
|
406
419
|
default:
|
|
407
420
|
exec(command);
|
|
408
421
|
}
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/seafile-editor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.90",
|
|
4
4
|
"private": false,
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "^0.0.9",
|
|
7
7
|
"@seafile/slate-react": "^0.54.13",
|
|
8
8
|
"codemirror": "^5.37.0",
|
|
9
9
|
"crypto-js": "^3.1.9-1",
|
|
10
|
+
"dayjs": "^1.10.7",
|
|
10
11
|
"deep-equal": "^1.0.1",
|
|
11
12
|
"deepmerge": "^2.1.0",
|
|
12
13
|
"detect-indent": "^4.0.0",
|
|
@@ -23,7 +24,6 @@
|
|
|
23
24
|
"jszip": "^3.2.1",
|
|
24
25
|
"lodash": "4.17.21",
|
|
25
26
|
"mdast-util-definitions": "^1.2.2",
|
|
26
|
-
"moment": "^2.22.2",
|
|
27
27
|
"object-assign": "4.1.1",
|
|
28
28
|
"prismjs": "1.23.0",
|
|
29
29
|
"promise": "8.0.1",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|