mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 00:43:53 +00:00
change the mechanism of saving txt file, use md file's way of saving
This commit is contained in:
@@ -10,6 +10,7 @@ import CommentPanel from './comment-panel';
|
||||
import '../../css/file-view.css';
|
||||
|
||||
const propTypes = {
|
||||
onSaveChangedContent: PropTypes.func.isRequired,
|
||||
content: PropTypes.object.isRequired
|
||||
};
|
||||
|
||||
@@ -17,6 +18,7 @@ const { isStarred, isLocked, lockedByMe,
|
||||
repoID, filePath, enableWatermark, userNickName
|
||||
} = window.app.pageOptions;
|
||||
|
||||
|
||||
class FileView extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
@@ -25,7 +27,7 @@ class FileView extends React.Component {
|
||||
isStarred: isStarred,
|
||||
isLocked: isLocked,
|
||||
lockedByMe: lockedByMe,
|
||||
isCommentPanelOpen: false
|
||||
isCommentPanelOpen: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -81,6 +83,7 @@ class FileView extends React.Component {
|
||||
<FileToolbar
|
||||
isLocked={this.state.isLocked}
|
||||
lockedByMe={this.state.lockedByMe}
|
||||
onSaveChangedContent={this.props.onSaveChangedContent}
|
||||
toggleLockFile={this.toggleLockFile}
|
||||
toggleCommentPanel={this.toggleCommentPanel}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user