1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-24 04:48:03 +00:00

delete sdoc module in 10.0 (#5522)

This commit is contained in:
杨顺强
2023-06-28 18:14:43 +08:00
committed by GitHub
parent 873b20fb8a
commit 6a0f9f6aa3
37 changed files with 23 additions and 3713 deletions

View File

@@ -1,20 +0,0 @@
import React from 'react';
import { SDocViewer } from '@seafile/sdoc-editor';
import '../../css/sdoc-file-view.css';
const { fileContent } = window.app.pageOptions;
class FileContent extends React.Component {
render() {
const document = fileContent ? JSON.parse(fileContent) : null;
return (
<div className="file-view-content flex-1 o-auto sdoc-file-view p-0 d-flex flex-column">
<SDocViewer document={document} />
</div>
);
}
}
export default FileContent;

View File

@@ -141,7 +141,7 @@ class FileToolbar extends React.Component {
/>
)}
{(canEditFile && fileType != 'SDoc' && !err) &&
{(canEditFile && !err) &&
( this.props.isSaving ?
<button type={'button'} aria-label={gettext('Saving...')} className={'btn btn-icon btn-secondary btn-active'}>
<i className={'fa fa-spin fa-spinner'}/></button> :
@@ -195,9 +195,9 @@ class FileToolbar extends React.Component {
</DropdownItem>
)}
{filePerm == 'rw' && (
<a href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}&referer=${encodeURIComponent(location.href)}`} className="dropdown-item">
{gettext('History')}
</a>
<a href={`${siteRoot}repo/file_revisions/${repoID}/?p=${encodeURIComponent(filePath)}&referer=${encodeURIComponent(location.href)}`} className="dropdown-item">
{gettext('History')}
</a>
)}
</DropdownMenu>
</ButtonDropdown>
@@ -205,7 +205,7 @@ class FileToolbar extends React.Component {
<Dropdown isOpen={this.state.dropdownOpen} toggle={this.toggle} className="d-block d-md-none">
<ButtonGroup >
{(canEditFile && fileType != 'SDoc' && !err) &&
{(canEditFile && !err) &&
(this.props.isSaving ?
<button type={'button'} aria-label={gettext('Saving...')} className={'btn btn-icon btn-secondary btn-active'}>
<i className={'fa fa-spin fa-spinner'}/></button> :

View File

@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import { Utils } from '../../utils/utils';
import { enableSeadoc, gettext } from '../../utils/constants';
import { gettext } from '../../utils/constants';
import ModalPortal from '../modal-portal';
import CreateFolder from '../../components/dialog/create-folder-dialog';
import CreateFile from '../../components/dialog/create-file-dialog';
@@ -142,13 +142,6 @@ class DirOperationToolbar extends React.Component {
});
}
onCreateSeaDocToggle = () => {
this.setState({
isCreateFileDialogShow: !this.state.isCreateFileDialogShow,
fileType: '.sdoc'
});
}
onAddFile = (filePath, isDraft) => {
this.setState({isCreateFileDialogShow: false});
this.props.onAddFile(filePath, isDraft);
@@ -215,7 +208,6 @@ class DirOperationToolbar extends React.Component {
<button className="dropdown-item" onClick={this.onCreateExcelToggle} role="menuitem">{gettext('New Excel File')}</button>
<button className="dropdown-item" onClick={this.onCreatePPTToggle} role="menuitem">{gettext('New PowerPoint File')}</button>
<button className="dropdown-item" onClick={this.onCreateWordToggle} role="menuitem">{gettext('New Word File')}</button>
{enableSeadoc && <button className="dropdown-item" onClick={this.onCreateSeaDocToggle} role="menuitem">{gettext('New SeaDoc File')}</button>}
</div>
)}
</Fragment>