@seafile/sdoc-editor 0.1.130 → 0.1.131-test
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/assets/css/simple-viewer.css +6 -0
- package/dist/config.js +16 -0
- package/dist/pages/simple-viewer.js +21 -7
- package/package.json +1 -1
- package/public/media/sdoc-editor-font/iconfont.eot +0 -0
- package/public/media/sdoc-editor-font/iconfont.svg +2 -0
- package/public/media/sdoc-editor-font/iconfont.ttf +0 -0
- package/public/media/sdoc-editor-font/iconfont.woff +0 -0
- package/public/media/sdoc-editor-font/iconfont.woff2 +0 -0
- package/public/media/sdoc-editor-font.css +10 -6
package/dist/config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var serverConfig = {
|
|
2
|
+
//serviceUrl: "http://127.0.0.1:8000",
|
|
3
|
+
serviceUrl: "http://192.168.1.100:8000",
|
|
4
|
+
username: "lj@11.com",
|
|
5
|
+
password: "11",
|
|
6
|
+
repoID: "79d1fa93-4b5f-4d6c-8fb5-ad3958e1fa47",
|
|
7
|
+
userInfo: {
|
|
8
|
+
username: 'lj@11.com',
|
|
9
|
+
name: 'lj-',
|
|
10
|
+
contact_email: 'lj@11.com'
|
|
11
|
+
},
|
|
12
|
+
filePath: '/xxx.md',
|
|
13
|
+
fileName: 'xxx.md',
|
|
14
|
+
dirPath: '/'
|
|
15
|
+
};
|
|
16
|
+
export { serverConfig };
|
|
@@ -12,6 +12,7 @@ import Loading from '../components/loading';
|
|
|
12
12
|
import Layout, { Header, Content } from '../layout';
|
|
13
13
|
import { generateDefaultDocContent } from '../utils';
|
|
14
14
|
import ErrorBoundary from './error-boundary';
|
|
15
|
+
import '../assets/css/simple-viewer.css';
|
|
15
16
|
var SimpleViewer = /*#__PURE__*/function (_React$Component) {
|
|
16
17
|
_inherits(SimpleViewer, _React$Component);
|
|
17
18
|
var _super = _createSuper(SimpleViewer);
|
|
@@ -19,10 +20,6 @@ var SimpleViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
19
20
|
var _this;
|
|
20
21
|
_classCallCheck(this, SimpleViewer);
|
|
21
22
|
_this = _super.call(this, props);
|
|
22
|
-
_this.onValueChanged = function (value) {
|
|
23
|
-
_this.isValueChanged = true;
|
|
24
|
-
_this.value = value;
|
|
25
|
-
};
|
|
26
23
|
_this.state = {
|
|
27
24
|
isContextInit: false,
|
|
28
25
|
errorMessage: null,
|
|
@@ -95,10 +92,27 @@ var SimpleViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
95
92
|
className: "d-flex justify-content-center"
|
|
96
93
|
}, t(errorMessage));
|
|
97
94
|
}
|
|
98
|
-
var
|
|
99
|
-
|
|
95
|
+
var _context$getSettings = context.getSettings(),
|
|
96
|
+
docName = _context$getSettings.docName,
|
|
97
|
+
sharePermissionText = _context$getSettings.sharePermissionText,
|
|
98
|
+
downloadURL = _context$getSettings.downloadURL;
|
|
99
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(Layout, null, /*#__PURE__*/React.createElement(Header, null, /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
className: "doc-info"
|
|
101
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
102
|
+
className: "doc-name my-0"
|
|
103
|
+
}, docName), sharePermissionText && /*#__PURE__*/React.createElement("span", {
|
|
104
|
+
className: "sdoc-share-permission ml-2"
|
|
105
|
+
}, sharePermissionText)), /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: "doc-ops"
|
|
107
|
+
}, downloadURL && /*#__PURE__*/React.createElement("a", {
|
|
108
|
+
href: downloadURL,
|
|
109
|
+
className: "op-item"
|
|
110
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
111
|
+
className: "sdocfont sdoc-download"
|
|
112
|
+
})))), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(SDocViewer, {
|
|
100
113
|
document: document,
|
|
101
|
-
|
|
114
|
+
showToolbar: true,
|
|
115
|
+
showOutline: true
|
|
102
116
|
}))));
|
|
103
117
|
}
|
|
104
118
|
}]);
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
/>
|
|
15
15
|
<missing-glyph />
|
|
16
16
|
|
|
17
|
+
<glyph glyph-name="sdoc-download" unicode="" d="M582.4 326.4V793.6c0 41.6-32 70.4-70.4 70.4s-70.4-28.8-70.4-70.4v-467.2l-172.8 172.8c-25.6 25.6-70.4 25.6-96-3.2-25.6-25.6-25.6-70.4 0-96l291.2-291.2c25.6-25.6 70.4-25.6 96 0l291.2 291.2c25.6 25.6 25.6 70.4 3.2 96-25.6 25.6-70.4 25.6-96 3.2l-3.2-3.2-172.8-169.6z m-480-284.8h822.4c38.4 0 70.4-28.8 70.4-70.4s-32-67.2-73.6-67.2H102.4C60.8-96 32-67.2 32-25.6c0 35.2 28.8 67.2 70.4 67.2z" horiz-adv-x="1024" />
|
|
18
|
+
|
|
17
19
|
<glyph glyph-name="sdoc-next-page" unicode="" d="M342.4 768c12.8 0 28.8-6.4 38.4-16l329.6-329.6c22.4-22.4 22.4-57.6 0-76.8L380.8 16c-22.4-22.4-57.6-22.4-76.8 0-22.4 22.4-22.4 57.6 0 76.8L595.2 384 304 675.2c-22.4 22.4-22.4 57.6 0 76.8 9.6 9.6 25.6 16 38.4 16z" horiz-adv-x="1024" />
|
|
18
20
|
|
|
19
21
|
<glyph glyph-name="sdoc-previous-page" unicode="" d="M672 768c-12.8 0-28.8-6.4-38.4-16L304 422.4c-22.4-22.4-22.4-57.6 0-76.8L633.6 16c22.4-22.4 57.6-22.4 76.8 0 22.4 22.4 22.4 57.6 0 76.8L419.2 384l291.2 291.2c22.4 22.4 22.4 57.6 0 76.8-9.6 9.6-25.6 16-38.4 16z" horiz-adv-x="1024" />
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "sdocfont"; /* Project id 4097705 */
|
|
3
|
-
src: url('./sdoc-editor-font/iconfont.eot?t=
|
|
4
|
-
src: url('./sdoc-editor-font/iconfont.eot?t=
|
|
5
|
-
url('./sdoc-editor-font/iconfont.woff2?t=
|
|
6
|
-
url('./sdoc-editor-font/iconfont.woff?t=
|
|
7
|
-
url('./sdoc-editor-font/iconfont.ttf?t=
|
|
8
|
-
url('./sdoc-editor-font/iconfont.svg?t=
|
|
3
|
+
src: url('./sdoc-editor-font/iconfont.eot?t=1693362307040'); /* IE9 */
|
|
4
|
+
src: url('./sdoc-editor-font/iconfont.eot?t=1693362307040#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
|
5
|
+
url('./sdoc-editor-font/iconfont.woff2?t=1693362307040') format('woff2'),
|
|
6
|
+
url('./sdoc-editor-font/iconfont.woff?t=1693362307040') format('woff'),
|
|
7
|
+
url('./sdoc-editor-font/iconfont.ttf?t=1693362307040') format('truetype'),
|
|
8
|
+
url('./sdoc-editor-font/iconfont.svg?t=1693362307040#sdocfont') format('svg');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.sdocfont {
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
-moz-osx-font-smoothing: grayscale;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
.sdoc-download:before {
|
|
20
|
+
content: "\e652";
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
.sdoc-next-page:before {
|
|
20
24
|
content: "\e626";
|
|
21
25
|
}
|