Skip to content

Commit

Permalink
[mobile] published library: fixup for 'side panel' (haiwen#4790)
Browse files Browse the repository at this point in the history
* [mobile] published library: fixup for 'side panel'

* [mobile] published library: close the side panel when visit a md file
  • Loading branch information
llj authored Jan 14, 2021
1 parent 78008fa commit 03fd92d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions frontend/src/css/wiki.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ img[src=""] {
display:flex;
flex-direction:column;
overflow:hidden;
z-index: 1051; /* for mobile */
}

.wiki-main-panel {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/wiki.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class Wiki extends Component {
}

loadSidePanel = (initialPath) => {

if (hasIndex) {
this.loadIndexNode();
} else {
Expand Down Expand Up @@ -293,7 +292,7 @@ class Wiki extends Component {
}

onMenuClick = () => {
this.setState({closeSideBar: !this.state.closeSideBar,});
this.setState({closeSideBar: !this.state.closeSideBar});
}

onMainNavBarClick = (nodePath) => {
Expand Down Expand Up @@ -363,6 +362,7 @@ class Wiki extends Component {
if (node.path !== this.state.path) {
this.showFile(node.path);
}
this.onCloseSide();
} else {
const w = window.open('about:blank');
const url = siteRoot + 'd/' + sharedToken + '/files/?p=' + Utils.encodePath(node.path);
Expand Down

0 comments on commit 03fd92d

Please sign in to comment.