1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 17:33:18 +00:00

[mobile] published library: fixup for 'side panel' (#4790)

* [mobile] published library: fixup for 'side panel'

* [mobile] published library: close the side panel when visit a md file
This commit is contained in:
llj
2021-01-14 23:22:24 +08:00
committed by GitHub
parent 78008faee8
commit 03fd92dce9
2 changed files with 3 additions and 2 deletions

View File

@@ -56,6 +56,7 @@ img[src=""] {
display:flex; display:flex;
flex-direction:column; flex-direction:column;
overflow:hidden; overflow:hidden;
z-index: 1051; /* for mobile */
} }
.wiki-main-panel { .wiki-main-panel {

View File

@@ -74,7 +74,6 @@ class Wiki extends Component {
} }
loadSidePanel = (initialPath) => { loadSidePanel = (initialPath) => {
if (hasIndex) { if (hasIndex) {
this.loadIndexNode(); this.loadIndexNode();
} else { } else {
@@ -293,7 +292,7 @@ class Wiki extends Component {
} }
onMenuClick = () => { onMenuClick = () => {
this.setState({closeSideBar: !this.state.closeSideBar,}); this.setState({closeSideBar: !this.state.closeSideBar});
} }
onMainNavBarClick = (nodePath) => { onMainNavBarClick = (nodePath) => {
@@ -363,6 +362,7 @@ class Wiki extends Component {
if (node.path !== this.state.path) { if (node.path !== this.state.path) {
this.showFile(node.path); this.showFile(node.path);
} }
this.onCloseSide();
} else { } else {
const w = window.open('about:blank'); const w = window.open('about:blank');
const url = siteRoot + 'd/' + sharedToken + '/files/?p=' + Utils.encodePath(node.path); const url = siteRoot + 'd/' + sharedToken + '/files/?p=' + Utils.encodePath(node.path);