mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 08:28:11 +00:00
Merge pull request #3326 from haiwen/update_txt_file_save_mechanism
Update txt file save mechanism
This commit is contained in:
@@ -10,13 +10,17 @@ import CommentPanel from './comment-panel';
|
||||
import '../../css/file-view.css';
|
||||
|
||||
const propTypes = {
|
||||
content: PropTypes.object.isRequired
|
||||
onSaveChangedContent: PropTypes.func.isRequired,
|
||||
content: PropTypes.object.isRequired,
|
||||
isSaving: PropTypes.bool.isRequired,
|
||||
isContentChangedButNotSaved: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
const { isStarred, isLocked, lockedByMe,
|
||||
repoID, filePath, enableWatermark, userNickName
|
||||
} = window.app.pageOptions;
|
||||
|
||||
|
||||
class FileView extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
@@ -25,7 +29,7 @@ class FileView extends React.Component {
|
||||
isStarred: isStarred,
|
||||
isLocked: isLocked,
|
||||
lockedByMe: lockedByMe,
|
||||
isCommentPanelOpen: false
|
||||
isCommentPanelOpen: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -81,6 +85,9 @@ class FileView extends React.Component {
|
||||
<FileToolbar
|
||||
isLocked={this.state.isLocked}
|
||||
lockedByMe={this.state.lockedByMe}
|
||||
onSaveChangedContent={this.props.onSaveChangedContent}
|
||||
isSaving={this.props.isSaving}
|
||||
isContentChangedButNotSaved={this.props.isContentChangedButNotSaved}
|
||||
toggleLockFile={this.toggleLockFile}
|
||||
toggleCommentPanel={this.toggleCommentPanel}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user