2023-04-17 07:32:52 +00:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDom from 'react-dom';
|
2023-04-18 10:23:03 +00:00
|
|
|
import { SimpleViewer } from '@seafile/sdoc-editor';
|
2023-04-17 07:32:52 +00:00
|
|
|
|
2023-04-18 10:23:03 +00:00
|
|
|
const { serviceURL } = window.app.config;
|
|
|
|
const { repoID, filePath, fileName } = window.shared.pageOptions;
|
2023-04-17 07:32:52 +00:00
|
|
|
|
2023-04-18 10:23:03 +00:00
|
|
|
const { rawPath } = window.shared.pageOptions;
|
2023-04-17 07:32:52 +00:00
|
|
|
|
2023-04-18 10:23:03 +00:00
|
|
|
window.seafile = {
|
|
|
|
repoID,
|
|
|
|
rawPath: rawPath,
|
|
|
|
docName: fileName, // required
|
|
|
|
docPath: filePath,
|
|
|
|
serviceUrl: serviceURL,
|
|
|
|
};
|
2023-04-17 07:32:52 +00:00
|
|
|
|
2023-04-18 10:23:03 +00:00
|
|
|
class ViewFileSdoc extends React.Component {
|
2023-04-17 07:32:52 +00:00
|
|
|
|
|
|
|
render() {
|
2023-04-18 10:23:03 +00:00
|
|
|
return <SimpleViewer />;
|
2023-04-17 07:32:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-18 10:23:03 +00:00
|
|
|
ReactDom.render(<ViewFileSdoc />, document.getElementById('wrapper'));
|
|
|
|
|