@seafile/seafile-editor 0.3.89 → 0.3.92
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/normalize-controller.js +0 -0
- package/dist/editor/controller/shortcut-controller.js +3 -10
- package/dist/editor/custom/custom.js +0 -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
|
|
File without changes
|
|
@@ -333,19 +333,12 @@ var withMarkdownShortcut = function withMarkdownShortcut(editor) {
|
|
|
333
333
|
_Editor$nodes10 = _slicedToArray(_Editor$nodes9, 1),
|
|
334
334
|
_node3 = _Editor$nodes10[0];
|
|
335
335
|
|
|
336
|
-
var listItemPath = _node3[1];
|
|
337
|
-
var listNode = Node.parent(editor, listItemPath); // Unwrap the list item when the selection is at the first list item of the first node of document
|
|
336
|
+
var listItemPath = _node3[1]; // Unwrap the list item when the selection is at the first list item
|
|
338
337
|
|
|
339
|
-
if (
|
|
338
|
+
if (listItemPath.at(-1) === 0 && anchor.path[listItemPath.length] === 0) {
|
|
340
339
|
listUtils.unwrapList();
|
|
341
340
|
return;
|
|
342
|
-
} //
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
if (listNode.children.length === 1 && Node.text(listNode).length === 0) {
|
|
346
|
-
listUtils.unwrapList();
|
|
347
|
-
return;
|
|
348
|
-
} // list items with mutiple chidren
|
|
341
|
+
} // List items with mutiple chidren
|
|
349
342
|
|
|
350
343
|
|
|
351
344
|
var currentChildBlockIndex = anchor.path[anchor.path.length - 2];
|
|
File without changes
|
|
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.92",
|
|
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
|