@seafile/seafile-editor 0.3.95 → 0.3.96-test-3

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.
@@ -25,12 +25,6 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
25
25
 
26
26
  _this = _super.call(this, props);
27
27
 
28
- _this.toggleResolvedComment = function () {
29
- _this.setState({
30
- showResolvedComment: !_this.state.showResolvedComment
31
- });
32
- };
33
-
34
28
  _this.listComments = function (isScroll) {
35
29
  _this.props.editorApi.listComments().then(function (res) {
36
30
  _this.setState({
@@ -178,25 +172,8 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
178
172
  var participants = this.props.participants;
179
173
  return /*#__PURE__*/React.createElement("div", {
180
174
  className: "seafile-comment"
181
- }, /*#__PURE__*/React.createElement("div", {
182
- className: "seafile-comment-toggle-resolved"
183
- }, /*#__PURE__*/React.createElement("div", {
184
- className: 'seafile-comment-title-text'
185
- }, t('Show_resolved_comments')), /*#__PURE__*/React.createElement("div", {
186
- className: 'seafile-comment-title-toggle d-flex'
187
- }, /*#__PURE__*/React.createElement("label", {
188
- className: "custom-switch",
189
- id: "toggle-resolved-comments"
190
- }, /*#__PURE__*/React.createElement("input", {
191
- type: "checkbox",
192
- name: "option",
193
- className: "custom-switch-input",
194
- onChange: this.toggleResolvedComment,
195
- checked: this.state.showResolvedComment && 'checked'
196
- }), /*#__PURE__*/React.createElement("span", {
197
- className: "custom-switch-indicator"
198
- })))), /*#__PURE__*/React.createElement("ul", {
199
- className: window.showParticipants ? 'seafile-comment-list show-participants' : 'seafile-comment-list',
175
+ }, /*#__PURE__*/React.createElement("ul", {
176
+ className: "flex-fill seafile-comment-list ".concat(window.showParticipants ? 'show-participants' : ''),
200
177
  ref: "commentsList"
201
178
  }, this.state.commentsList.length > 0 && this.state.commentsList.map(function (item) {
202
179
  var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
@@ -219,7 +196,7 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
219
196
  }), this.state.commentsList.length === 0 && /*#__PURE__*/React.createElement("li", {
220
197
  className: "comment-vacant"
221
198
  }, t('no_comment_yet'))), /*#__PURE__*/React.createElement("div", {
222
- className: "seafile-comment-footer"
199
+ className: "seafile-comment-footer flex-shrink-0"
223
200
  }, participants && window.showParticipants && /*#__PURE__*/React.createElement(ParticipantsList, {
224
201
  openDialogs: this.props.openDialogs,
225
202
  participants: participants,
@@ -248,12 +225,14 @@ var CommentPanel = /*#__PURE__*/function (_React$Component) {
248
225
  clos: "100",
249
226
  rows: "3",
250
227
  warp: "virtual"
251
- }), /*#__PURE__*/React.createElement(Button, {
228
+ }), /*#__PURE__*/React.createElement("div", {
229
+ className: "comment-submit-container"
230
+ }, /*#__PURE__*/React.createElement(Button, {
252
231
  className: "submit-comment",
253
232
  color: "primary",
254
233
  size: "sm",
255
234
  onClick: this.onSubmit
256
- }, t('submit'))));
235
+ }, t('submit')))));
257
236
  }
258
237
  }]);
259
238
 
@@ -61,7 +61,7 @@ var DetailListView = /*#__PURE__*/function (_React$Component) {
61
61
  fileInfo = _this$props.fileInfo;
62
62
  var filePath = this.props.editorApi.filePath;
63
63
  return /*#__PURE__*/React.createElement("div", {
64
- className: "dirent-table-container"
64
+ className: "dirent-table-container p-2"
65
65
  }, /*#__PURE__*/React.createElement("table", {
66
66
  className: "table-thead-hidden"
67
67
  }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("th", {
@@ -109,7 +109,7 @@ var OutlineView = /*#__PURE__*/function (_React$PureComponent2) {
109
109
 
110
110
  var headerList = this.state.headerList;
111
111
  return /*#__PURE__*/React.createElement("div", {
112
- className: "seafile-editor-outline"
112
+ className: "seafile-editor-outline py-2 pr-4"
113
113
  }, headerList && headerList.length > 0 ? headerList.map(function (node, index) {
114
114
  return /*#__PURE__*/React.createElement(OutlineItem, {
115
115
  key: index,
@@ -116,9 +116,9 @@ var SidePanel = /*#__PURE__*/function (_React$PureComponent) {
116
116
  }
117
117
 
118
118
  return /*#__PURE__*/React.createElement("div", {
119
- className: "side-panel"
119
+ className: "side-panel d-flex flex-column"
120
120
  }, /*#__PURE__*/React.createElement("ul", {
121
- className: "nav justify-content-center"
121
+ className: "flex-shrink-0 nav justify-content-around bg-white"
122
122
  }, /*#__PURE__*/React.createElement("li", {
123
123
  className: "nav-item"
124
124
  }, /*#__PURE__*/React.createElement("a", {
@@ -144,7 +144,7 @@ var SidePanel = /*#__PURE__*/function (_React$PureComponent) {
144
144
  }, /*#__PURE__*/React.createElement("i", {
145
145
  className: 'iconfont icon-comment'
146
146
  })))), /*#__PURE__*/React.createElement("div", {
147
- className: "side-panel-content"
147
+ className: "side-panel-content flex-fill"
148
148
  }, this.state.navItem === 'outline' && /*#__PURE__*/React.createElement(OutlineView, {
149
149
  editor: this.props.editor,
150
150
  document: this.props.document,
@@ -0,0 +1,15 @@
1
+ var serverConfig = {
2
+ serviceUrl: "https://download.seafile.top",
3
+ username: "xxx",
4
+ password: "xxx",
5
+ repoID: "xxxxxxx-xxxx-xxx-xxx-xxxx",
6
+ userInfo: {
7
+ username: 'xxx',
8
+ name: 'xxx',
9
+ contact_email: 'xxxx'
10
+ },
11
+ filePath: '/demo.md',
12
+ fileName: 'demo.md',
13
+ dirPath: '/'
14
+ };
15
+ export { serverConfig };
@@ -34,14 +34,19 @@ var defaultStyle = {
34
34
  minHeight: 90,
35
35
  height: 90,
36
36
  border: '1px solid #e6e6dd',
37
- borderRadius: '5px',
37
+ borderBottom: 'none',
38
+ borderRadius: '5px 5px 0 0',
38
39
  overfflowY: 'auto',
39
40
  '&focused': {
41
+ outline: 'none'
42
+ /*
40
43
  backgroundColor: '#cee4e5',
41
44
  outlineOffset: '-2px',
42
45
  outlineColor: '-webkit-focus-ring-color',
43
46
  outlineStyle: 'auto',
44
- outlineWidth: '5px'
47
+ outlineWidth: '0px',
48
+ */
49
+
45
50
  }
46
51
  }
47
52
  },
@@ -1,30 +1,10 @@
1
1
  .seafile-comment {
2
2
  display: flex;
3
3
  flex-direction: column;
4
- position: relative;
5
4
  height: 100%;
6
- margin-top: -8px;
7
- margin-bottom: -8px;
8
- }
9
- .seafile-comment-toggle-resolved {
10
- width: 100%;
11
- border-bottom: 1px solid #e5e5e5;
12
- padding: 5px 10px;
13
- display: flex;
14
- position: absolute;
15
- justify-content: space-between;
16
- background-color: #fff;
17
5
  }
18
6
  .seafile-comment-list {
19
- height: calc(100% - 135px);
20
- margin-bottom: 135px;
21
- margin-top: 32px;
22
7
  overflow-y: auto;
23
- background-color: #fff;
24
- }
25
- .seafile-comment-list.show-participants {
26
- height: calc(100% - 165px);
27
- margin-bottom: 155px;
28
8
  }
29
9
  .seafile-comment-list .comment-vacant {
30
10
  padding: 1em;
@@ -71,6 +51,9 @@
71
51
  }
72
52
  .seafile-comment-item .seafile-comment-content {
73
53
  margin-left: 42px;
54
+ padding: 5px 10px;
55
+ border-radius: 4px;
56
+ background: #fff;
74
57
  }
75
58
  .seafile-comment-item .seafile-comment-content p {
76
59
  word-break: break-all;
@@ -92,16 +75,12 @@
92
75
  background-color: #e6ffed;
93
76
  }
94
77
  .seafile-comment-footer {
95
- background-color: #fafaf9;
96
78
  padding: 10px 10px;
97
79
  border-top: 1px solid #e5e5e5;
98
80
  display: flex;
99
81
  flex-direction: column;
100
82
  min-height: 150px;
101
83
  max-height: 300px;
102
- position: absolute;
103
- bottom: -16px;
104
- width: 100%;
105
84
  }
106
85
  .seafile-comment-footer .add-comment-input,
107
86
  .seafile-edit-comment .edit-comment-input {
@@ -112,11 +91,32 @@
112
91
  background-color: #fff;
113
92
  width: 100%;
114
93
  }
94
+ .seafile-comment-footer .add-comment-input {
95
+ border-bottom: none;
96
+ border-radius: 5px 5px 0 0;
97
+ }
98
+ .seafile-comment-footer .add-comment-input:focus {
99
+ outline: none;
100
+ }
101
+ .seafile-comment-footer .comment-submit-container {
102
+ border: 1px solid #e6e6dd;
103
+ border-top: none;
104
+ border-radius: 0 0 5px 5px;
105
+ padding: 5px;
106
+ background: #fff;
107
+ text-align: right;
108
+ position: relative;
109
+ }
110
+ .seafile-comment-footer .comment-submit-container::before {
111
+ border-top: 1px solid #e6e6dd;
112
+ content: '';
113
+ position: absolute;
114
+ left: 5px;
115
+ right: 5px;
116
+ top: 0;
117
+ }
115
118
  .seafile-comment-footer .submit-comment {
116
- margin-top: 5px;
117
- width: fit-content;
118
119
  height: 28px;
119
- display: inline-block;
120
120
  }
121
121
  .seafile-edit-comment .comment-btn {
122
122
  height: 28px;
@@ -1,16 +1,7 @@
1
- .dirent-table-container {
2
- padding: 0px 10px;
3
- display: flex;
4
- }
5
-
6
1
  .dirent-table-container tr {
7
2
  border: none;
8
3
  }
9
4
 
10
- .dirent-table-container table {
11
- flex: 1;
12
- }
13
-
14
5
  .dirent-table-container th,
15
6
  .dirent-table-container td {
16
7
  padding: 5px 3px;
@@ -1,7 +1,7 @@
1
1
  .seafile-editor-module .side-panel {
2
2
  user-select: none;
3
3
  height:100%;
4
- background-color: #f5f7fa;
4
+ background-color: #f5f5f5;
5
5
  }
6
6
  .seafile-editor-module .side-panel .nav {
7
7
  border-bottom: 1px solid #eee;
@@ -31,11 +31,8 @@
31
31
  font-size: 0.875rem;
32
32
  }
33
33
  .seafile-editor-module .side-panel-content {
34
- padding-top: 8px;
35
- padding-bottom: 8px;
36
- height: calc(100% - 36px);
37
- overflow: hidden;
38
34
  font-size: 0.937rem;
35
+ overflow: hidden;
39
36
  }
40
37
 
41
38
  .seafile-editor-module .side-panel-content:hover {
@@ -127,10 +124,6 @@
127
124
  }
128
125
  }
129
126
 
130
- .seafile-editor-outline {
131
- margin-right: 1rem;
132
- }
133
-
134
127
  .outline-h2, .outline-h3 {
135
128
  white-space: nowrap;
136
129
  overflow: hidden;
@@ -371,7 +371,7 @@ var SimpleEditor = /*#__PURE__*/function (_React$Component) {
371
371
  _this.state = {
372
372
  value: props.value,
373
373
  leftNavMode: 'files',
374
- mainPanelWidth: 80,
374
+ mainPanelWidth: (window.innerWidth - 300) / window.innerWidth * 100,
375
375
  resizeFlag: false,
376
376
  isShowHelpDialog: false,
377
377
  isShowSidePanel: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/seafile-editor",
3
- "version": "0.3.95",
3
+ "version": "0.3.96-test-3",
4
4
  "private": false,
5
5
  "dependencies": {
6
6
  "@seafile/react-image-lightbox": "^0.0.9",