@seafile/seafile-editor 0.3.102 → 0.3.104
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/README.md
CHANGED
|
@@ -44,7 +44,7 @@ seafile-editor/
|
|
|
44
44
|
## 本地测试步骤
|
|
45
45
|
1. 新增本地配置文件 setting.local.js(基于 /site/setting.local.dist.js copy 一份)
|
|
46
46
|
2. 在 seahub 项目创建一个测试文件, 根据需要的配置信息完善配置内容
|
|
47
|
-
3. 执行 npm run start
|
|
47
|
+
3. 执行 npm run start, 启动测试服务, 可以打开相应的网址, 对封装的组件进行测试
|
|
48
48
|
|
|
49
49
|
## 新版本发布
|
|
50
50
|
1. 更新 package.json 中的 version 属性
|
|
@@ -44,6 +44,12 @@ var OutlineView = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
44
44
|
|
|
45
45
|
_this.setState({
|
|
46
46
|
headerList: headerList
|
|
47
|
+
}, function () {
|
|
48
|
+
var updateForNoOutline = _this.props.updateForNoOutline;
|
|
49
|
+
|
|
50
|
+
if (headerList.length == 0 && updateForNoOutline) {
|
|
51
|
+
updateForNoOutline();
|
|
52
|
+
}
|
|
47
53
|
});
|
|
48
54
|
};
|
|
49
55
|
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var serverConfig = {
|
|
2
|
+
serviceUrl: 'dhttps://dev.seafile.com/seahub',
|
|
3
|
+
username: 'bing.an@seafile.com',
|
|
4
|
+
password: 'Seafile123#$%',
|
|
5
|
+
repoID: '66ffac5c-9cce-4738-a867-bb8931821e04',
|
|
6
|
+
userInfo: {
|
|
7
|
+
username: 'bing.an@seafile.com',
|
|
8
|
+
name: '安冰',
|
|
9
|
+
contact_email: 'bing.an@seafile.com'
|
|
10
|
+
},
|
|
11
|
+
filePath: '/测试.md',
|
|
12
|
+
fileName: '测试.md',
|
|
13
|
+
dirPath: '/'
|
|
14
|
+
};
|
|
15
|
+
export { serverConfig };
|
|
@@ -97,7 +97,8 @@ var MarkdownViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
97
97
|
var _this$props = this.props,
|
|
98
98
|
scriptSource = _this$props.scriptSource,
|
|
99
99
|
showTOC = _this$props.showTOC,
|
|
100
|
-
activeTitleIndex = _this$props.activeTitleIndex
|
|
100
|
+
activeTitleIndex = _this$props.activeTitleIndex,
|
|
101
|
+
updateForNoOutline = _this$props.updateForNoOutline;
|
|
101
102
|
|
|
102
103
|
if (scriptSource) {
|
|
103
104
|
return /*#__PURE__*/React.createElement(LoadScript, {
|
|
@@ -110,7 +111,8 @@ var MarkdownViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
110
111
|
document: value,
|
|
111
112
|
isViewer: true,
|
|
112
113
|
activeTitleIndex: activeTitleIndex,
|
|
113
|
-
scrollToNode: this.scrollToNode
|
|
114
|
+
scrollToNode: this.scrollToNode,
|
|
115
|
+
updateForNoOutline: updateForNoOutline
|
|
114
116
|
})));
|
|
115
117
|
}
|
|
116
118
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.big-image-cover {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.big-image-cover .image-container-close {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 10px;
|
|
8
|
+
right: 10px;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
width: 30px;
|
|
11
|
+
height: 30px;
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.big-image-cover .image-container-close .icon-close {
|
|
18
|
+
color: rgba(0, 0, 0, 0.5);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.big-image-cover .image-container-close .icon-close:hover {
|
|
22
|
+
color: rgba(0, 0, 0, 0.75);
|
|
23
|
+
}
|
|
@@ -3,7 +3,9 @@ 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 ModalPortal from '../components/modal-portal';
|
|
7
|
+
import { Modal } from 'reactstrap';
|
|
8
|
+
import './viewer-image.css';
|
|
7
9
|
|
|
8
10
|
var ViewerImage = /*#__PURE__*/function (_React$Component) {
|
|
9
11
|
_inherits(ViewerImage, _React$Component);
|
|
@@ -18,7 +20,7 @@ var ViewerImage = /*#__PURE__*/function (_React$Component) {
|
|
|
18
20
|
_this = _super.call(this, props);
|
|
19
21
|
|
|
20
22
|
_this.toggleBigImage = function (event) {
|
|
21
|
-
event.preventDefault();
|
|
23
|
+
event && event.preventDefault();
|
|
22
24
|
|
|
23
25
|
_this.setState({
|
|
24
26
|
isShowBigImage: !_this.state.isShowBigImage
|
|
@@ -70,13 +72,19 @@ var ViewerImage = /*#__PURE__*/function (_React$Component) {
|
|
|
70
72
|
}(React.Component);
|
|
71
73
|
|
|
72
74
|
var BigImage = function BigImage(props) {
|
|
73
|
-
return /*#__PURE__*/React.createElement(
|
|
74
|
-
|
|
75
|
+
return /*#__PURE__*/React.createElement(ModalPortal, null, /*#__PURE__*/React.createElement(Modal, {
|
|
76
|
+
isOpen: true,
|
|
77
|
+
centered: true,
|
|
78
|
+
toggle: function toggle() {
|
|
79
|
+
props.toggleBigImage();
|
|
80
|
+
}
|
|
81
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: "big-image-cover",
|
|
75
83
|
onClick: function onClick(event) {
|
|
76
84
|
return props.toggleBigImage(event);
|
|
77
85
|
}
|
|
78
86
|
}, /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
className:
|
|
87
|
+
className: "big-image-container"
|
|
80
88
|
}, /*#__PURE__*/React.createElement("img", {
|
|
81
89
|
src: props.src,
|
|
82
90
|
alt: ""
|
|
@@ -84,10 +92,10 @@ var BigImage = function BigImage(props) {
|
|
|
84
92
|
onClick: function onClick(event) {
|
|
85
93
|
return props.toggleBigImage(event);
|
|
86
94
|
},
|
|
87
|
-
className:
|
|
95
|
+
className: "image-container-close"
|
|
88
96
|
}, /*#__PURE__*/React.createElement("i", {
|
|
89
|
-
className:
|
|
90
|
-
}))));
|
|
97
|
+
className: "iconfont icon-close"
|
|
98
|
+
})))));
|
|
91
99
|
};
|
|
92
100
|
|
|
93
101
|
export { ViewerImage };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/seafile-editor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.104",
|
|
4
4
|
"private": false,
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@seafile/react-image-lightbox": "^0.0.9",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"clean": "rm -rf dist && mkdir dist",
|
|
55
|
-
"start": "node scripts/start.js",
|
|
56
|
-
"start
|
|
55
|
+
"start.bak": "node scripts/start.js",
|
|
56
|
+
"start": "export NODE_ENV=development LOG_ENV=rc && node dev-server.js",
|
|
57
57
|
"build": "node scripts/build.js",
|
|
58
58
|
"pub:dist": "export BABEL_ENV=production && ./node_modules/.bin/babel src --out-dir dist --copy-files",
|
|
59
59
|
"pub:optimized": "rm dist/config.js",
|