1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

Wiki optimized third (#2406)

This commit is contained in:
shanshuirenjia
2018-09-29 15:47:53 +08:00
committed by Daniel Pan
parent 5cffd4cb69
commit 3ab4cbff4f
22 changed files with 612 additions and 107 deletions

View File

@@ -352,13 +352,12 @@ class Wiki extends Component {
onDeleteNode = (node) => {
let filePath = node.path;
if (node.isMarkdown()) {
editorUtilities.deleteFile(filePath);
} else if (node.isDir()) {
if (node.isDir()) {
editorUtilities.deleteDir(filePath);
} else {
return false;
editorUtilities.deleteFile(filePath);
}
let isCurrentFile = false;
if (node.isDir()) {
@@ -533,9 +532,11 @@ class Wiki extends Component {
onMainNavBarClick={this.onMainNavBarClick}
onMainNodeClick={this.onMainNodeClick}
switchViewMode={this.switchViewMode}
onDeleteNode={this.onDeleteNode}
onRenameNode={this.onRenameNode}
/>
</div>
)
);
}
}